title: using try catch and throw
body: <p>My understanding of the try function, was to stop errors that could possibly occur between try and catch.
  But if I do something like this:</p>
  
  <pre><code>std::vector&lt;int&gt; testvector;
  testvector.push_back(1);
  
  try{
  cout &lt;&lt; testvector[53485375345534] &lt;&lt; endl;
  }catch(...){
  
  }
  </code></pre>
  
  <p>My idea was that it would not cause an error in the expense for memory, but it does nothing in this case, an error still pops up.</p>
  
  <p>Could someone explain the proper reason for using try, so far in my experience, i could have used an if statement beforehand instead, could someone give me an example when you would need a try statement?</p>