included ctype.h

This commit is contained in:
Alexei Keller 2025-11-06 15:26:29 +01:00
parent 0b1aa615e7
commit f3b58a6150

View File

@ -2,6 +2,7 @@
#include <time.h> #include <time.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h>
#define MAX_RAND_TRIES_PER_WORD 10 #define MAX_RAND_TRIES_PER_WORD 10
#define EMPTY_CHAR 0 #define EMPTY_CHAR 0
@ -101,7 +102,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
// fügt zufällige Buchstaben ein // fügt zufällige Buchstaben ein
for(int l = 0; l < searchFieldLen; l++){ for(int l = 0; l < searchFieldLen; l++){
for(int m = 0; m < searchFieldLen; m++ ){ for(int m = 0; m < searchFieldLen; m++ ){
if(char isalpha(salad[l][m]) == 0 ){ if(isalpha(salad[l][m]) == 0 ){
// zufällige Buchstaben erzeugen // zufällige Buchstaben erzeugen
char alphabet [] = "abcdefghijklmnopqrstuvwxyz"; char alphabet [] = "abcdefghijklmnopqrstuvwxyz";
int laenge = strlen(alphabet); int laenge = strlen(alphabet);