B
Bo Yang
HI,
How can I get a line of data into a string object. With cin.getline
() I can only put the line data into a char *. I want to the line data
be put directly into a string object. And the line may contain space/
tab, so a cin >> string, will not work.
Is there any convinient way to do this? Thanks
Regards!
Bo
How can I get a line of data into a string object. With cin.getline
() I can only put the line data into a char *. I want to the line data
be put directly into a string object. And the line may contain space/
tab, so a cin >> string, will not work.
Is there any convinient way to do this? Thanks
Regards!
Bo