August 2nd, 2010, 11:27 AM
[RESOLVED] Problems with classes (C2061)
I'll try to be brief. I have several classes in my program, and now I'm having trouble making them work together. The details: I have classes Ball (Ball.cpp + Ball.h) and Wall (Wall.cpp + Wall.h). I was trying to create a new function in Ball with a parameter of type Wall, as follows:
This is its declaration in Ball.h, line 27. It is also mentioned in Ball.cpp properly.
bool CB_col(Wall blck) const;
However, the compiler doesn't seem to accept the code:
I was made sure to include the header file:
ball.h(27) : error C2061: syntax error : identifier 'Wall'
I've searched through many places about this, but this just feels different from all others. There is absolutely no semi-comma or bracket missing in any of the 4 files.
If there isn't enough info on the problem, it can be provided when requested. Thanks in advance.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!