title: C++ .exe stopped working
body: <p>I am having a very difficult time with c++.
  I made a hello world that has compiled to make YouTube.exe and main.o.
  I run the program and it prints hello world, but then says YouTube.exe has stopped working.
  Even when I move main.o to a different directory, YouTube.exe still prints hello world and stops working!
  So I have 2 questions:
  1. Why did the program still print hello world when main.o was removed?
  2. Why did the program stop working? This was the code:</p>
  
  <pre><code>main.cpp:
  
  #include&lt;iostream&gt;
  
  using namespace std;
  
  int main(){
  
      int a;
      cout &lt;&lt; "Hello World!";
      cin &gt;&gt; a; //to make the program pause
  
      return 0;
  }
  </code></pre>