Why is the below class definition NOT valid

Please take a look and let me know why the below class definition is not valid.


class student
{
public:
void student();
void student(string s, double g, int i);
void set(string s, double g, int i);
void print();
private:
string name;
double gpa;
int id;
}
You're missing the semicolon after the declaration of your class. I assume that you have your definitions either in another file or further below and didn't include them.

Also the constructors are supposed to have datatypes.
Volatile Pulse wrote:
Also the constructors are supposed to have datatypes.

What do you mean by that?
DUH, I should have seen that. It's the smallest details that get me on these. Thanks Volatile!
Peter87 wrote:
What do you mean by that?

Oops, I meant aren't. Stupid smart phone -.-
Topic archived. No new replies allowed.