-3
need to limit and a specific value that would be 511
char command[512];
I tried with
char command[512];
scanf("%511s",command);
if (StrToInt(command))>511)
printf("FIX ATK");
and that too
char command[512];
scanf("%511s", command);
if (strlen(command) > 511)
printf("FIX ATK");
and I didn’t succeed, someone knows how to solve?
Do you want the size entered to be less than 512? If so, what is the difficulty or problem? Or do you want to limit the number typed to less than 512? If so, why not ask for it as a number? This works: https://ideone.com/XtZAT9.
– Maniero