Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

scan

macrumors 6502
Original poster
Oct 24, 2005
344
0
is there a way to read an input string from the user that will include the spaces?
 

ChrisA

macrumors G5
Jan 5, 2006
12,572
1,682
Redondo Beach, California
scan said:
is there a way to read an input string from the user that will include the spaces?

What's the context here? A command line program reading from stdin? Or is this some graphial interfacewhere you've put up a dialog box. Or is this a cgibin program running off a web server? You need to define the problem.

For starts read "man stdio" and then read the "see also" subjects at the bottom of the page.

That said, when I read user input that a user is typing, I always like to use the "readline" library. Users kind of expect this functionality now days..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.