Hello, I am trying to use a POINT in a class. When I create the header file everything is rosey. I created the .cpp file and included the header, now however I have a 'identifier "POINT" is undefined' problem in both the header file and the .cpp file.
-header
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#ifndef __SHAPES_H__
#define __SHAPES_H__
class CShapes
{
public:
CShapes();
~CShapes();
POINT get_Start() const;
void set_Start(POINT _newStart);
private:
POINT starting_pos;
};
#endif // !__SHAPES_H__
In the ".cpp" file you have posted you have included the header file "Shapes.h", but what other header files are in the file? And what is in the "main" file along with what header files are included.
In "POINT" is undefined it sounds like the header file that defines "POINT" is missing.
Without seeing what is missing it is hard to guess at where the problem is.
Like some error messages the problem may not be where you think it is, but could come from a file you have not even considered.
There is a good chance that you are missing a header file that defines "POINT".