So I have a file called main.cpp and another called Character.h, in the same folder in a DevC++ project:
1 2 3 4 5 6
//main.cpp
int main()
{
return 0;
}
1 2 3 4 5 6
//Character.h
class Character
{
}
Now when I put #include "Character.h" before int main()
It gives me an error:
2 C:\Projects\Overworld\main.cpp new types may not be defined in a return type
2 C:\Projects\Overworld\main.cpp extraneous `int' ignored
C:\Projects\Overworld\main.cpp In function `Character _mangled_main()':
5 C:\Projects\Overworld\main.cpp conversion from `int' to non-scalar type `Character' requested
C:\Projects\Overworld\Makefile.win [Build Error] [main.o] Error 1