I'm comming from VB background so have nightmare to switch to C/C++ in rewriting of simple programs, actually, to start ith cpp.
So, situation is:
int ReadIL(bool RW, long ILRecord, IL);
In my main cpp program I have also included il.h
int ReadIL(RW, ILRecord, IL)
int ILLength=sizeof(struct ILRec);
if (ILRecord<1) ILRecord=1;
if (!f) return 1;
// strcpy(IL.myRowStr,"my string to file");
fwrite(&IL, ILLength, 1, f);
fread(&IL, ILLength, 1, f);
and from there I call function like this:
And I get several errors during compiling
ReadIL(false, ILRecord, IL);
C:\Users\John\Desktop\aaa\il.h|1|error: 'IL' has not been declared|
C:\Users\John\Desktop\aaa\aaaMain.cpp||In member function 'void aaaFrame::OnbtnOpenClick(wxCommandEvent&)':|
C:\Users\John\Desktop\aaa\aaaMain.cpp|344|error: cannot convert 'ILRec' to 'int' for argument '3' to 'int ReadIL(bool, long int, int)'|
||=== Build finished: 2 errors, 0 warnings ===|
Purpose of wanted program is to chose a record in Main program (ILRecord) and to get required data in structure IL from function ReadIL from other file in same project.
What do I do bad and how to get this to work?
Please for recommendation at newbie level.