Actually i want the user to enter a line of string having multiple words in it for example \"My name is ABC\". What is the C/C++ code for this purp
You can use std::getline() to get a line from std::cin.
std::getline()
std::cin
#include #include using namespace std; int main () { string name; cout << "Enter Name: "; getline (cin,name); cout << "You entered: " << name; }