I want to be able to access the buffer in the istream class. I don't want to use cin.getline(blah,blah,blah). I would rather use cin and its overloaded operator >> and create my own class that will manipulate my input. So, if I type in James Bond with cin >>, and then cout <<, I only get James.

If I can somehow access the pointer in the buffer, I sould be able to retrieve what I sent in using cin >>.

friend stream &stream operator >>(stream&, obj &) allows me to pass an object while setting private member chars. This is great, but yet I still only end up with James.

The only reason why I don't want to use cin.getline() is it does not work outside of main. If it does work outside of main, then I am doing something wrong and please tell me how to use it outside of main(). Otherwise...my question is, how can I access what i sent into strbuffer, iostream & istream and get out what I sent in without using cin.getline()?