Search code examples
c++functioncall

Call a function (ofstream) C++


Hello I have a probleme with my Code.I don't know how to call the function with the ofstream.

//Username
Username(ofstream& reg);
//Password
Password(ofstream& reg);
//Email
Email(ofstream& reg);
//Gender
Gender(ofstream& reg);
Line(22) The Error is: Expected primary-expression before '&' token
Line(24) The Error is: Expected primary-expression before '&' token
Line(26) The Error is: Expected primary-expression before '&' token
Line(28) The Error is: Expected primary-expression before '&' token

Solution

  • Remove ofstream &. Function calls don't include types.