Re: Setting up a class
Michael Bell wrote:
Using Borland Builder 5 I am trying to get a very simple first working
use of a class to work. Following the example of the OU course MT262
as nearly as I can, I have Created files named Class First,
ClassSecond, and ClassThird. And it's still wrong!
It is a windows application, but I don't think that's relevant.
ClassFirst.cpp
//---------------------------------------------------------------------------
[..lots of irrelevant cruft removed..]
#endif
OOOOOOOOOOOOOOO..
And the error messages I get are :-
[C++ Error] ClassSecond.cpp(12): E2108 Improper use of typedef
'NumberBoardType'
Apparently you defined 'NumberBoardType' as a typedef (to what? you
didn't show), and then are trying to use the same name to define
a class or something.
[C++ Error] ClassSecond.cpp(12): E2108 Improper use of typedef
'NumberBoardClass'
Same here.
[C++ Error] ClassSecond.cpp(13): E2108 Improper use of typedef
'NumberBoardType'
Same here.
[C++ Error] ClassSecond.cpp(14): E2235 Member function must be called
or its address taken
Most likely you use wrong syntax (like 'object.func', without the
following parens, or 'type::member' without the preceding '&'), but
there is no way to be certain because you didn't post the code that
gives you the error, you posted some other code, which is full of
non-standard constructs which prevents us from trying to compile it.
I really don't know what's wrong!
Whole lot of things, probably. No way to know for sure. See the
FAQ, section 5 ("How to Post").
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask