August 5th, 2013, 10:20 AM
Originally Posted by Proff
I'm having a weird problem
i'm trying to read a string from a console with scanf()
but it doesnt read anything. it just skips the entire scanf.
I'm trying it in gcc compiler
I just want to know of a way to read strings with spaces using the gcc compiler Please give me a simple solution. Please don't confuse with buffers and stuff
Thank you in advance
What you're describing works for us. In order to find out why it doesn't seem to work for you, we would need to see what you are actually doing.
Show us the code that "doesn't work". A shortened program that still exhibits the problem would do as well. Also tell us exactly
what you input to get those results.