using namespace std;
The class Student
{
Public:
Student (int n, char s, char nam []) : num ((n), sex (s)
{
Strcpy (name, nam);
}
Void out ()
{
Cout
Private:
int num;
Char sex;
Char name [20].
};
Int main ()
{
Student stud1 (10101, 'm', "Wang_li");
Void Student: : out ();
return 0;
}
G: \ c + + practice \ GHBNHB \ jiljk CPP (9) : error C2958: the left parenthesis' (' found at "G: \ c + + practice package \ GHBNHB \ jiljk CPP (6) 'was not matched correctly
What is the meaning of this? Thanks!
CodePudding user response:
Student (int n, char s, char nam []) : num ((n), sex (s)Num right, there are two left parenthesis
Matching parentheses didn't complete