Is there an ansi c function equivelant to the c++ getline function? The only way I can think of to do this is to use the read system call (on linux), but I wouldn't know what to do if I were trying to read a line on another system.
Printable View
Is there an ansi c function equivelant to the c++ getline function? The only way I can think of to do this is to use the read system call (on linux), but I wouldn't know what to do if I were trying to read a line on another system.
Use fgets()
sorry I wasn't clear in my initial post. I'm reading from the command line.