c++ - an error "variable of field declared void" -
I have this code:
header - test.h
Inside, I have definition of some class A and two function quizzes and quiz 2
zero quiz (int i); Zero Quiz 2 (AA, one cons * pay);
I call function quiz 2 from quiz
a1 (i); A * Pa 1 = New A (A1); Quiz 2 (A1, Pe1);
The implementation of this function is:
zero quiz 2 (A, one const * pa) {int i = a; Cout & lt; & Lt; I & lt; & Lt; Endl; }
But in my header, I get 3 errors near the line definition of quiz 2:
Multiple markers on this line - initial expression list Is considered as a complex expression - 'A' has not been declared in this area - variable or field 'quiz 2' declared zero
Why can anyone explain why? Thank you in advance
I forgot that I should declare classes first and only after that work , It is now working
Comments
Post a Comment