As a C/Cpp beginner I have problems to organize my project properly.
So, I want to have functions which will be used from more than one cpp file in more than one project.
I declared data types and functions from those common file C-stylish in one "il.h" file like this:
- Code: Select all
struct myData
{
char myFlag[1];
int myInt;
long myLong;
float myFloat;
char myStr1[12];
char myStr2[16];
};
int myfunction(bool RW, long iRec, struct myData* d);
Myfunction is function in ma il.cpp file for reading or writing (RW) binary record (iRec) from file and return d (data structure) to program (cpp) which calls them.
In my main cpp I also include "il.h" from where I plan to call function and do something with data.
But I get errors like:
C:\Users\John\Desktop\aaa\il.h|12|error: expected ')' before 'RW'
Obviously, I didn't declared something properly.
Will anybody help me to get this to work please?
