0
Strings
#include<iostream> using namespace std; main() { char a[15]; cout<<"Input your name : "; cin>>a; cout<<"your name : "<<a; return 0; } input : this test why the output of the program just show the first word (just the word 'this')? How about if I want to show the whole sentence? Am I have to use 2 variable a and b?
2 Respostas
+ 4
u can try: getline(cin, a);
0
thanks