HI Everyone , this is a piece of my code (in StudentBinary.h) :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
#ifndef STUDENTBINARY_H_INCLUDED
#define STUDENTBINARY_H_INCLUDED
#include "Student.h"
class StuBinary
{
private :
char * FirstName ;
char * LastName ;
public :
//StuBinary (Student input) ;
void Change (Student input) ;
} ;
#endif // STUDENTBINARY_H_INCLUDED
|
When I try to build it , an error appears :
line 13 -> Student hasn't been declared .
BUT as you see I have included "Student.h" !!!!
And this is another piece of my code in another file and another function :
1 2 3 4 5 6 7
|
for (it = stus.begin () ; it != stus.end () ; it ++)
{
tmp = * it ; //it is an iterator of 'vector <Student>' and tmp is an object of class 'Student'
StuBinary Btmp ;
Btmp.Change (tmp) ;
stubin.write ((char *) & Btmp , 40) ; //stubin is a binary file
}
|
A strange error appears here too :
line 5 -> no matching function for call to 'StuBinary :: Change (Student &)
candidate is : void StuBinary :: Change (int)
no known conversion for argument 1 from 'Studnet' to 'int'
Why is that ?
I haven't any 'Change (int)' anywhere .
THNX!