Any idea why this program does not give me the opportunity to enter a string?
I don't have the possibility to try it out soon. But I guess it has something to do with buffered I/O which might not be supported by the CON window. Try this instead:
Read (Input(), str, 80);
Note that this only works for a window. If you read from a file it will not stop at \n.
FGets (Input(),buffer,buffer_size);
Thanks Thomas.
I searched more than an hour for this info.
Any idea why this program does not give me the opportunity to enter a string?
8.Amiga OS 4:S> guis:c/test
Please enter a string
str
8.Amiga OS 4:S>
Have you tried scanf() ?
Simon
I don't have the possibility to try it out soon. But I guess it has something to do with buffered I/O which might not be supported by the CON window. Try this instead:
Read (Input(), str, 80);
Note that this only works for a window. If you read from a file it will not stop at \n.