title: Struct inside a Class with another Class as parameter
body: <p>I have a project to work on. 
  It has a Class Temp, which has few functions. 
  Then there's another Class Weather which stores data in a Struct called Observation. This struct has one it's fields of type class Temp. </p>
  
  <pre><code>Class Temp {
  Temp();
  Temp(string t);
  string getTemp();
  void setTemp(string temp); 
  };
  
  Class Weather
  { 
  </code></pre>
  
  <p>@beta </p>
  
  <p>in my Weather class 
  i have few functions which call class Temp </p>
  
  <pre><code>// Weather.h
  
  public:
  
  void record(Temp temp, float d); // error 'Temp' has not been declared
  Temp getTemp() const; // 'Temp' does not name a type
  
   protected: 
   struct Observation 
   {
     Temp t;
     int deg;
   }; 
   Observation obs[20];
  };
  
   // Weather.cpp 
  
   void Temp::record(Temp temp, float d){
   obs[i].temp = temp; 
   obs[i].deg = d;
   i++;
  
   }
  </code></pre>
  
  <p>I have tried creating an instance of Temp and Weather. 
  But I am not able to get to the Temp t inside the struct.</p>
  
  <pre><code>int main(){
  Temp t;
  Weather w;
  w.record(tt,dd); 
  }
  </code></pre>
  
  <p>Please guide me... </p>