title: A problem with object member
body: <p>I've got a problem in a C++ program that I can't solve.
  I'm trying to pass an object as a construction parameter of an other but i can't figure out how to do this.</p>
  
  <p>My main is creating a Simulation object. In simulation i'm creating two objects a planete and a modelisation. The thing is, i want to pass the planete object in the modelisation object.</p>
  
  <p>My first object is Simulation.</p>
  
  <pre><code>#include "Simulation.h"
  #include "Modelisation.h"
  #include "Planete.h"
  
  Planete *Obj;
  Modelisation *Model;
  
  Simulation::Simulation (int argc, char **argv)
  {
      Obj = new Planete ("Terre", (5.98*pow(10.0,24.0)), 6378.137, 0, 0, 0);
      Model = new Modelisation (argc, argv,"Modelisation",1600 ,1004, 306, 0);
  };
  Simulation::~Simulation ()
  {
      delete Obj;
      delete Model;
  };
  </code></pre>
  
  <p>Modelisation.h</p>
  
  <pre><code>class Modelisation
  {
  private:
      int hauteur, largeur, x, y;
      int fenetre;
      //Planete ClonePlanete
  public:
      Modelisation (int argc, char **argv, char[], int, int, int, int);
      ~Modelisation ();
      static void Dessiner ();
      static void Redessiner (int, int);
      void InitCallBack ();
  };
  </code></pre>
  
  <p>Modelisation.cpp</p>
  
  <pre><code>#include "stdafx.h"
  #include "Modelisation.h"
  #include "Camera.h"
  #include "Planete.h"
  
  Camera *camera;
  
  Modelisation::Modelisation (int argc, char **argv, char nomFenetre [] ,int hauteur, int largeur, int x, int y)
  {
  
      glutInit (&amp;argc, argv);
      glutInitDisplayMode (GLUT_SINGLE);
      glutInitWindowSize (hauteur, largeur);
      glutInitWindowPosition (x, y);
      fenetre = glutCreateWindow (nomFenetre);
      camera = new Camera;
  //  Planete ClonePlanete = new Planete(planete);  // Basicaly that's what i'm trying to do
  };
  
  Modelisation::~Modelisation ()
  {
      delete camera;
  };
  </code></pre>
  
  <p>Planete.h</p>
  
  <pre><code>class Planete
  {
  private:
      std::string nom;
      double masse;
      double diametre;
      struct position { double x, y, z;};
      double x,y,z;
  
  public:
      Planete (std::string nom, double masse, double diametre, double x, double y, double z);
      Planete (const Planete &amp;);
      ~Planete ();
  };
  </code></pre>
  
  <p>Thanks for your help, it will be very appreciated!</p>