an error "variable of field declared void"
- by lego69
I have this code:
header - test.h
Inside header I have some class Z and definitions of two functions test and test2
I call function test2 from test
void test2(Z z, Z const *za);
this is implementation of the function:
void test2(Z z, Z const *za){
int i = z; //this row works
cout << i << endl;
}
I call it from test:
test2(z1, za1); // za1 is pinter to object and z1 is some object
but in my header I receive an 3 errors:
Multiple markers at this line
- initializer expression list treated as compound
expression
- `A' was not declared in this scope
- variable or field `quiz2' declared void
can somebody please explain why? thanks in advance