Consider the following code:
Here are the errors my compiler gives. I'm using Visual Studio .NET 2003:Code://--Header-Files---------------------------------- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include <vector> //------------------------------------------------ //--Global-Variables------------------------------ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ double CoordinateMultiplierX = 0; //Size of X axis increment in Pixels double CoordinateMultiplierY = 0; //Size of Y axis increment in pixels int MapX = 0; //Size of Client Rectangle X int MapY = 0; //Size of Client Rectangle Y //------------------------------------------------ //--Structures------------------------------------ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ struct Points { double x; double y; bool Invisible; //TRUE = Move to, FALSE = Line to Points(double xx, double yy, bool i) { x = xx * CoordinateMultiplierX; y = yy * CoordinateMultiplierY; Invisible = i; } }; //------------------------------------------------ //--Vector-Declarations--------------------------- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vector<Points> MapPoints ; //Contains points to draw Map Lines //------------------------------------------------
Code:error C2143: syntax error : missing ';' before '<' error C2501: 'vector' : missing storage-class or type specifiers error C2065: 'MapPoints' : undeclared identifier
Can someone please tell me why these errors occur? I can't seem to figure it out


Reply With Quote

Bookmarks