I'm working on a simple program that will calculate a total number of days depending on the number of days and weeks the user enters. When I call my function in int main(), it says "expected primary-expression before 'int'". I'm new to C++ syntax and came over from Java, what am I missing? (If that's even the problem)
this is the prototype of system() int system(constchar *command);
this is how you called it system("PAUSE");
that way, `command' will take the value "PAUSE" and the function will do something with that.
now you have the function void giveDays(int days, int weeks)
so you may call it giveDays(54, 13);
then `days' will take the value 54 and `weeks' will take 13
... and then you just simply discard those value and use the user input...
as an advice, try to avoid doing input/output operations inside functions, limit that to main()
hopefully you'll understand what's the porpuse of parameters and return value.