Home > Back-end >  Novice to solve
Novice to solve

Time:04-11

Mistakes in editing E0020 undefined identifiers how to solve

CodePudding user response:

That define a, like this:
 
Int I, j, n, m;
Char a, [1024].

CodePudding user response:

reference 1st floor QZJHJXJ response:
that define a, like this:
 
Int I, j, n, m;
Char a, [1024].

Severity code shows the project file line prohibits display status
Error C2065 "PGoods" : no statement of identifiers Project7 C: \ Users \ ASUS \ source \ repos \ Project7 \ Project7 \ Suppermacket h 6
This is the

CodePudding user response:

refer to the second floor m0_57094644 response:
Quote: refer to 1st floor QZJHJXJ response:
that define a, like this:
 
Int I, j, n, m;
Char a, [1024].

Severity code shows the project file line prohibits display status
Error C2065 "PGoods" : no statement of identifiers Project7 C: \ Users \ ASUS \ source \ repos \ Project7 \ Project7 \ Suppermacket h 6
This is the

The class Suppermacket {
Private:
Goods * PGoods [10];
Public:
Suppermacket () {
for (int i=0; I & lt; 10; I++) PGoods [I]=0;
}
Void Append ();
Void the Delete ();
Void the Query ();
Friend void Sale (Suppermacket&);
};
Void Sale (Suppermacket&);

CodePudding user response:

 Goods * PGoods [10]. 
the Goods is to define the structure of the body? Or another?

CodePudding user response:

reference 4 floor QZJHJXJ response:
 Goods * PGoods [10]. 
the Goods is to define the structure of the body? Or another?

Definition of a class

CodePudding user response:

That Goods definition or declaration of a class, it is in the class Suppermacket behind the front of the class definition or, if in the back, in the class Suppermacket class write a line in front of the working class Goods; Such statement, then still have to check, * PGoods [10] this variable, in reference to local and definitions are consistent, is there a written mistake, much less a character or a character,
 working class Goods. 

The class Suppermacket {
Private:
Goods * PGoods [10];
Public:
Suppermacket () {
for (int i=0; I & lt; 10; I++) PGoods [I]=0;
}
Void Append ();
Void the Delete ();
Void the Query ();
Friend void Sale (Suppermacket&);
};

Void Sale (Suppermacket&);


Working class Goods {
//...
//...
};

CodePudding user response:

Or the difference between the case,

CodePudding user response:

Is I can't see the code...
  • Related