Problem With Virtual Methods
Ok am in the header file I am going to post below, I i get the following errors
error C2061: syntax error : identifier 'fstream'
I get those two errors for the two methods, I searched for the error but what i found didn't help, so am here once again.
Code:
#ifndef INSURANCE_H
#define INSURANCE_H
#include "Date.h"
using std::string;
#include<string>
#include<fstream>
//Parent Class || Abstract Class
class Policy{
private:
string policy_type;//Policy Type
protected:
int pol_num;//policy number
string pol_hol;//policy holder
Date eff_date;//effective date of policy
Date exp_date;//expiry date of policy
public:
Policy();//default constructor, used to instantiate the object
Policy(Date&, Date&, string);//Primary Constructor For Policy
~Policy();//Destructor
//Accessors
int getPolNum();
string getPolHol();
Date getEffDate();
Date getExpDate();
//Mutators
void setPolNum(int);
void setPolHol(string);
void setEffDate(int, int, int);
void setExpDate(int, int, int);
//Calculation Method
virtual float Premium (float)= 0;//This is the polimorphic function declaration
virtual void Add (fstream)=0;
//virtual void Delete(void)= 0;
//virtual void Edit(void)= 0;
virtual void View(fstream)= 0;
};//Closes The Class
#endif