Thursday, July 9, 2009

A turbo c++ error i cant explain (about classes)?

hey. im using c++ on turbo and im trying to do a simple class program, in 2 seperated files, but im having a wierd error. (typne name expected).


here is the first (student.h) file of the program





#include %26lt;string.h%26gt;


class student{


private:


string stname;


int stid;


public:


student();


student(string x,int y);


void setname(string a);


void setid(int b);


void printstudent();


}





and i emplemented another (student.cpp) file that includes the .h file.


the .cpp has what each function do.


the error always appear in the .h file exactly in the private part "string stname; " it tells me that "type name expected" what does that suppose to mean ? :S any suggestions?

A turbo c++ error i cant explain (about classes)?
Is there any string data type exist in your version of compiler???





you better recheck it. If it exists then post entire source code with error(s).





i will check it.





bye


No comments:

Post a Comment