I need help...
how can I make it so that the user can enter more than one word for thier string (ex: "blah blah", rght now I can only read the first blah)
please help!
Printable View
I need help...
how can I make it so that the user can enter more than one word for thier string (ex: "blah blah", rght now I can only read the first blah)
please help!
Code:#include <iostream>
using namespace std;
int main ()
{
char name[256], title[256];
cout << "Enter your name: ";
cin.getline (name,256);
cout << "Enter your favourite movie: ";
cin.getline (title,256);
cout << name << "'s favourite movie is " << title;
return 0;
}