how to implement an acceptance of unknown input size (during console entry by user) in a char array, like the way std::string does? (m using gcc/g++ under ubuntu)?
Printable View
how to implement an acceptance of unknown input size (during console entry by user) in a char array, like the way std::string does? (m using gcc/g++ under ubuntu)?
see the code starting on page 3 from the Stroustrup paper
on learning C++ ...
http://www2.research.att.com/~bs/new_learning.pdf
my understanding of getchar() was a bit different...i thought getchar() gets a character from the user and requires <CR> to be pressed after every char. input...getch() under curses library with line-buffering off does it..however i wanted it without any additional libraries if possible...but bjarne wrote that so i think its my understanding that's a bit off...can u explain.