I've set up my programs and header files as what I think is the correct way, but I keep getting the error mentioned in the title.
I have tried searching for fixes for this issue, which most of them were simply adding ';' after the class definition in a header file. I've tried most all the fixes I could find with the same results.
Here is the main program where the error is flagging:
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include "computeGross.h"
#include "computeInsurance.h"
#include "Employee.h" /*<-----------------This is where the error flags*/
using namespace std;
int main()
{ }
And here is the header file that the error is flagging:
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include <string>
using namespace std;
struct Employee
{
string name;
double rate;
double hours;
double insurance;
double social;
double stateTax;
double fedTax;
double netPay;
double grossPay;
};
#endif