Thanks Hammer.
Always good.
Printable View
Thanks Hammer.
Always good.
No it does not need to be used.. you can use...Quote:
Originally posted by Simon
I posted it before but are buff and bufsiz standard variable names, do they have to be used and are they only used to show the size of the file?
buf[80]
for example
Note that you need to use the "string.h"Code:
int main()
{
char buf[80];
printf(" type in a string\n");
fgets(buf,80,stdin);
printf(" your string is %s ",buf);
return 0;
}
>>Note that you need to use the "string.h"
For what? The only header needed for your short example code is stdio.h.
ahh yes you are right... hmm i always used string.h for that.. errr ohh well.. thanx for the info