0

I need to get an output of the input that I have created the first one, but I maybe do something wrong because the second output won't print out the input

cout << "Movie Name: " << endl;
cin.getline(movie_name, SIZE);
cin.ignore();

cout << "Movie Name: " << movie_name << endl;

The last line only output "Movie Name:" but won't print out the input that I have created.

vaultah
  • 36,713
  • 12
  • 105
  • 132

1 Answers1

0

Try this:

cout<< "Movie Name: " << endl;
cin >> movie_name >> endl;
cout << "Movie Name: " << movie_name << endl;
TheUnknown
  • 28
  • 7