|
class point3d {
public:
float x () {return _x;
private:
static float _x;
};
main ()
{
point3d rout;
point3d * pt =&rout;
cout << rout.x () << endl << pt-> x () << endl;
}
In the above program, an error LNK2001: unresolved external symbol "private: static float Point3d :: _ x" (? _X @ Point3d @@ 0MA) is always reported as an error. I can remove the static and it can run, please prawn instructions! |
|