Hello! everyone , Can anyone tell me how take input of string, so that data after the space don't lose.
whenever i input a string it take the first word and neglect the whole sentence.
string str1;
cin>>str1;
cout <<str1;
Thanx
|
Contributor
|
|
| 7Mar2009,03:59 | #1 |
|
Hello! everyone , Can anyone tell me how take input of string, so that data after the space don't lose.
whenever i input a string it take the first word and neglect the whole sentence. string str1; cin>>str1; cout <<str1; Thanx |
|
Mentor
|
![]() |
| 7Mar2009,05:37 | #2 |
|
Go4Expert Founder
|
![]() |
| 7Mar2009,08:51 | #3 |
|
use cin.getline();
|