1,401
Loading...
Uploader Comments (AppleProgramming)
see all
All Comments (9)
-
@unifiedreality I think it is just some weird thing Xcode does. When you #include any of the header files it autofills anyone of them. If you #include string.h it will fill in string like it does with stdio. It is only meant to be a file pointer.
-
just wondering, when we use 'fgets', we often feed input via 'stdin' or a file pointer. Whats the 'stdio' that we sometimes see with typing assistance?
Loading...
Why can't I just compare with "exit\0" and leave the input string as it is?
RMH1565 5 days ago
@RMH1565 Well you would be comparing "exit\n" because we are replacing that with the NULL character \0. \0 doesn't appear as a character so we just compare "exit".
AppleProgramming 5 days ago
when is the \n actually written to get rid of? is that when we hit the enter key?
AwesomeChannel476 1 month ago
@AwesomeChannel476 Yep, fgets will tack on the \n when you hit the return key.
AppleProgramming 1 month ago
In the function RepalceReturn(char *myString) why you used '*' for character?
deepak10066 5 months ago
@deepak10066 A char* is any kind of string. So it just means you are passing in a C string.
AppleProgramming 5 months ago