I'm trying to copy the contents of a C++ (.cpp file) to a C (.c file) code because i need to convert it. Most of the errors I got are now fixed, but there is one remaining.
Here is the code — I have removed all the things that don't relate with the issue:
/*Prototype*/
void breakTime(time_t time, tmElements_t tm);
/*Creation*/
static tmElements_t tm;
/*Functions*/
void breakTime(time_t timeInput,tmElements_t &tm){
tm.Second = 10;
}
The compiler gives me:
expected ';' , ',' or ')' before '&' token
I tried editing the function and replace &tm by just tm. It does compile, but the problem is the values that are assigned inside the function to tm. Members are not transfered to the outside of the function (which would be the idea).
Any advice how to solve this issues?