I'm trying to declare a structure definition in a header file so I can use the structure in other files, however I get the error:
error C2011: 'Points' : 'struct' type redefinition
from the file where the structure definition is declared. The structure is only defined in that header file.
This is all of the code in the header file:
struct Points {
int xCoordinate;
int yCoordinate;
int zCoordinate;
}; // end of struct Points definition
The name of the header file is StructPoints.h and there is no accompanying C++ file.
Also, this header is used in other files source and header files. If I include the header in a file called Test.h, would I also need to include it in a file called Test.cpp?
And is there anything else I need to add to make this header work?