header file of class...there is smth i dont Know what!!
May 3, 2010 at 3:57pm UTC
hi,am faceing smth that i didnt figure out whats the problem !!!
im realy mad :( becaus my code is prety fine...
this is the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//this is the specification of the code
#ifdef c_H
#define c_H
class c{
private :
struct student{
int ID,TCRD;
float GPA;
string departement,collage;
};
student arr[50];
public :
c(student[]);
void add(student[]);
void search(student[]);
void show(student[]);
void stat(student[]);
};
#endif
it didnt appear here but
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#define c_H
class c{
private :
struct student{
int ID,TCRD;
float GPA;
string departement,collage;
};
student arr[50];
public :
c(student[]);
void add(student[]);
void search(student[]);
void show(student[]);
void stat(student[]);
};
all of this terns to be gray immedaitly when i finish
wrighting #endif
can any one tell me whats the problem and how to avoid it...
thank you in advance.
May 3, 2010 at 4:03pm UTC
You need #if
n def, otherwise:
1 2 3 4
#ifdef c_H // if c_H is already defined
#define c_H // define it again
//...
#endif
May 3, 2010 at 4:09pm UTC
what amistake thank you Bazzy verey much :)
ill not do it again....stupet me!
Topic archived. No new replies allowed.