Trouble with objects and Pointers
<pre><code>vector &lt; Shape* &gt; shapes;

void createScene()
{

 image = QImage(width, height, 32); // 32 Bit
 Color amb(0.1,0.1,0.1);
 Color difCoef(0.75,0.6,0.22);
 Color spec(0.5,0.5,0.5);
 double shine= 3.0;
 Sphere *s = new Sphere(Point(0.0,0.0,-5), 100.0, amb, difCoef, spec, shine);
 shapes.push_back(s);

}




int main(){

 // initialize glut
 init(); 
 createScene();
 Shape *x = shapes[0];
 cout &lt;&lt; x-&gt;shine &lt;&lt; endl;
}





class Shape
{
 public: 
 Shape() {}
 ~Shape(){} 
 Color ambient;
 Color dif;
 Color spec;
 double shine;
 virtual bool checkIntersect(Point p, Point d, Point &amp;temp) = 0; // If intersects, return true else false.
 virtual Point getNormal(Point intPt) = 0; // Get the normal at the point of intersection
 //virtual void printstuff() = 0;

};
</code></pre>

<p>When it prints out shine, i get a value of zero? Why is that?</p>
