I'm having a problem with method declaration. I'm really new to C++ so I was hoping somebody could help. I'm including my header and part of. my source file
#ifndef HEADER_H
#define HEADER_H
#include <fstream>
using namespace std;
class employee
{
public:
void readData(ifstream & inf);
void Compute (int bp);
void print (ofstream & outf) const;
employee();
private:
int ID;
int Job_class;
int Years;
int Ed;
float sal;
};
#endif
Now the source file, I'm getting the error at void employee :: readData(ifstream&inf) Member Declaration not found. What am I missing here
#include <iostream>
#include <fstream>
#include <iomanip>
#include "employee.h"
using namespace std;
void employee ::readData(ifstream& inf)
{
inf >> ID >> Job_class >> Years >> Ed;