C++ expression and activity cin.getline -


i need output of input have created first one, maybe wrong because second output won't print out input

cout << "movie name: " << endl; cin.getline(movie_name, size); cin.ignore();  cout << "movie name: " << movie_name << endl; 

the last line output "movie name:" won't print out input have created.

try this:

cout<< "movie name: " << endl; cin >> movie_name >> endl; cout << "movie name: " << movie_name << endl; 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -