LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   reading from STD IN (scanf , gets and read wont work) (https://www.linuxquestions.org/questions/programming-9/reading-from-std-in-scanf-gets-and-read-wont-work-225307/)

nodger 09-01-2004 12:13 PM

reading from STD IN (scanf , gets and read wont work)
 
Is there any way to just read in a string including spaces from STDIN?
Scanf stops after the first space
Gets doesnt really work
Read needs to know the exact length in advance

itsme86 09-01-2004 04:47 PM

char buf[50];

fgets(buf, sizeof(buf), stdin);


All times are GMT -5. The time now is 11:43 PM.