|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - As usual, I'm lost
I have declared in a .h file
// shortened
struct DataRecord
{
int RecordNumber;
char Task[256];
char DueDate[10];
char Priority[2];
int Completed;
char Notes[2048];
int Deleted;
} Data;
//some other stuff...then
struct DataRecord * FindARecord(int iRecordNumber);
in the .cpp i declare this:
struct DataRecord *CFORMAPPDoc::FindARecord(int iRecordNumber){
struct DataRecord * MyData = new struct DataRecord;
//some code to find the record
if( rc == true )
return MyData;
else
return NULL;
}
the silly compiler however gives me this:
sc formadoc.cpp -cpp -Ae -mn -C -WA -S -3 -a8 -c -H -HO- -gf -D_DEBUG=1
-D_X86_=1 -D_MT=1 -Ic:\dm\stl -oformadoc.obj
Error: C:\dm\FORMAPP\formadoc.cpp(241): 'CFORMAPPDoc::FindARecord'
previously declared as something else
C:\dm\FORMAPP\formadoc.cpp(241): It was declared as:
CFORMAPPDoc::DataRecord*member func(int )
C:\dm\FORMAPP\formadoc.cpp(241): It is now declared: DataRecord*member
func(int )
Error: C:\dm\FORMAPP\formadoc.cpp(280): need explict cast to convert
C:\dm\FORMAPP\formadoc.cpp(280): from: CFORMAPPDoc::DataRecord*
C:\dm\FORMAPP\formadoc.cpp(280): to : DataRecord*
Lines Processed: 378 Errors: 2 Warnings: 0
Build failed
HELP!!!!!
Michael
Jun 27 2002
Michael Comperchio wrote: Jun 27 2002
Jan Knepper wrote:Michael Comperchio wrote: Jun 27 2002
|