J
jaime
Hi all.
According to the fgets wikipedia page, its prototype is:
char* fgets(char *string, int length, FILE * stream)
Given that fgets never assigns to the first parameter (the char
pointer), could the prototype also have been defined as:
char* fgets(char * const string, int length, FILE * stream)
Am I missing something here? (or is it really that "const"s are frequently
omitted?)
TIA, Jaime
According to the fgets wikipedia page, its prototype is:
char* fgets(char *string, int length, FILE * stream)
Given that fgets never assigns to the first parameter (the char
pointer), could the prototype also have been defined as:
char* fgets(char * const string, int length, FILE * stream)
Am I missing something here? (or is it really that "const"s are frequently
omitted?)
TIA, Jaime