Anyone know why my Hello World in C++ isn't working out? -


does know why hello world won't print anything?

here process went through far:

  • i downloaded visual studio 2015.
  • i created new project , named hello world , checked empty remove pre compiled headers.
  • after went source tab >insert new item , made new item, main function, , named main.cpp.
  • after writing code pressed ctrl+5 , command prompt appears, it's blank.

vs tells me project out of date before build it, heard isn't worry about.

here's code

#include <iostream>  using namespace std;  int main() {      cout << "hello world!" << endl;      return 0;      cin.get(); } 

and picture of i'm getting after pressing ctrl+5 , build.

the return 0 line going end program before cin.get() gets executed.

flip order of return 0 , cin.get().


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -