Simple problem integrating a self-written class with typical Visual C++ Single Document Interface app
Posted on 2004-11-15
I made a class declaration for an object called Wave in a file called waveFile.h. I implemented all the methods in a file called waveFile.cpp and made sure to include the pre-processor directive #include waveFile.h.
I used app wizard in Visual C++ 6.0 to create a simple SDI application I called SDITEST2. In the file SDITEST2doc.h I declared, under the public attributes section of the class, a Wave object like this:
I also made sure that at the top of SDITEST2doc.h, I had the pre-processor directive #include waveFile.h
Now in the SDITEST2doc.cpp file I wanted to reference this object. So I tried it:
BOOL CSDITEST2Doc::OnOpenDocument(LPCTSTR lpszPathName)
myWave(1,1, 44100); //construct a wave object
however I get the following error:
c:\3rd year project\code\sditest2\sditest2doc.cpp(93) : error C2064: term does not evaluate to a function
i know its a simple error...but at this stage that's all I know!