I'm trying to update some old code that won't compile as is. A big problem seems to be function declarations. I see them declared with regular variables at the beginning of the function, such as:
Code:
startrun() {
double GetParameters();
double num;
num = GetParameters("in");
// etc
}
Producing a compilation error of:
Code:
code-sim3.C:343: too many arguments to function `double GetParameters()'
code-sim3.C:361: at this point in file
This style occurs whether the function being called is in the same file as the calling function or if it is in a different file.
Another thing I'm seeing that I'm not familiar with is the following use of braces and semicolons:
Code:
{long time(); (Global->computestart) = time(0);};
Which, in addition to the excess braces and semicolons, also produces the same problem as above (declaring the use of a function followed by the actual use of it) and results in the same compilation error.
Finally, what is the point of a string of braces and semicolons, such as:
Thanks! I really appreciate any help I can get on this subject!