title: cout/cin does not name a type error
body: <p>Whats wrong with this code to keep on receiving this error?</p>
  
  <p>The error only happened when instead of putting "distanceFormula" in main, I made it it's own class.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  class distanceFormula {
      public:
  int speed;
  int time;
  int distance;
  
  cout &lt;&lt; "What is the speed?" &lt;&lt; endl;
  cin &gt;&gt; speed;
  
  cout &lt;&lt; "How long did the action last?" &lt;&lt; endl;
  cin &gt;&gt; time;
  
  
  distance = speed * time;
  
  cout &lt;&lt; "The distance traveled was " &lt;&lt; distance &lt;&lt; endl;
  };
  
  
  
  
  int main()
  {
  distanceFormula ao
  ao.distanceFormula;
  
  return 0;
  };
  </code></pre>