I am working with MVC++ 2005 Express Edition, and am getting the error C2533 when I try to compile the code.
------ Build started: Project: BiggerFish, Configuration: Release Win32 ------
Compiling...
Fish.cpp
.\Fish.cpp(11) : error C2533: 'Fish::{ctor}' : constructors not allowed a return type
Build log was saved at "file://c:\Documents and Settings\Hillam\My Documents\Visual Studio 2005\Projects\BiggerFish\BiggerFish\Release\BuildLog.htm"
BiggerFish - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
When I typed C2533 in the help files, it told me this:
int X::X()
{
} //C2533.
X::X()
{
} //OK.
The problem is that I haven't specified a return balue for this function, so why is it telling me I'm not allowed to?
Here is my class, Fish.cpp (Fish.h is somewhere else, and DOES exist, so don't tell me that is the problem):
////////////////////////////////////////////////
// Fish()
////////////////////////////////////////////////
Fish::Fish(void)
{
i_Level = 0;
i_Exp = 0;
i_MoveSpeed = 0;
c_MoveDirection;
b_IsBubble = FALSE;
}
////////////////////////////////////////////////
// ~Fish()
////////////////////////////////////////////////
Fish::~Fish(void)
{
}