G
Guest
i have a file named CDSEncoder.cpp, and i wanted to create a member variable
Peter van der Goes said:OK, CDSEncoder is your class name, correct?
And, you wish to add a protected member variable to your class definition
using the name m_encoder?
If I'm guessing right so far, you're actually attempting to instantiate an
object of type CDSEncoder before finishing the class definition, thus the
compiler is complaining that it has not yet detected the end of the class
definition (denoted by a ; following a }).
Basically, AFAIK (and I'm confident I'll be corrected if I'm wrong) you
cannot create an object of the class being defined as a member variable of
that class.
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
CDSEncoder is a wrapper class i found in 1 of the sample program... and now i need to create an object of that in KNNDlg.cpp so as to call the functions there... so how can i do it? u mean i cant jus write CDSEncoder m_encoder; ?