Hello I'm getting 2 errors
c:\computer science programming\excerise sheet 4\student\student.h(8) : error C2629: unexpected 'class Student ('
c:\computer science programming\excerise sheet 4\student\student.h(8) : error C2238: unexpected token(s) preceding ';'
heres the student class:
#ifndef STUDENT_H
#define STUDENT_H
class Student
{
public:
Student(const char *, const Date &);
void printStudent();
char * getname();
void print();
private:
char name[10];
const birthDate;
};
#endif
and its def
#include <iostream>
#include <cstring>
using namespace std;
#include "student.h"
#include "date.h"
Student::Student( const char * surname, const Date &dateOfBirth):birthDate(dateOfBirth)
{
strcpy(name , surname);
}
void Student::printStudent()
{
cout << "The students name is : "<< name << endl;
}
char * Student:: getname()
{
return name;
}
void Student::print()
{
cout << "The students information is: " ;
birthDate.print();
}