string - C++ cin input with spaces? - Stack Overflow
THE C WAY You can use gets function found in cstdio(stdio.h in c): #include int main(){ char name[256]; gets(name); // for input puts(name);// for printing } THE C++ WAY gets is removed in c++11. [Recommended]:You can use getline(cin,name) which is in str...