So, the issue is in the main driver .cpp file. It references the houseClassType as the problem, but I am not sure what needs to be done to resolve it. Any help would be awesome.
Standards header file:
#ifndef Standards_h
#define Standards_h
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
#endif
Standards .cpp file:
#include "Standards.h"
Realtor header file:
#include "Standards.h"
#include "house.h"
#ifndef Realtor_h
#define Realtor_h
const int NUMBER_OF_HOMES = 30;
struct realtorStructType
{
int numberOfHomes;
string agentName;
houseClassType homes[NUMBER_OF_HOMES];
};
void InputHomes(ifstream& fin, string agentName,
houseClassType homes[], int& numberOfHomes);
#endif
Realtor .cpp file:
#include "Standards.h"
#include "Realtor.h"
#include "house.h"
void InputHomes(ifstream& fin, string agentName, houseClassType
homes[], int& numberOfHomes)
{
getline(fin, agentName);
}
House header file:
#include "Standards.h"
#ifndef house_h
#define house_h
//Definition of class, house
class houseClassType
{
public:
///Default Constructor
houseClassType(void);
///Destructor
~houseClassType(void);
};
#endif
House .cpp file:
#include "Standards.h"
#include "Realtor.h"
#include "house.h"
houseClassType::houseClassType()
{
}
Main driver .cpp file: (Error is here)
#include "Standards.h"
#include "Realtor.h"
#include "house.h"
int main(void)
{
ifstream fin;
ofstream fout;
string agentName;
int numberOfHomes;
houseClassType homes[NUMBER_OF_HOMES];
//Open the input and output files
fin.open("listings.txt");
fout.open("Results.txt");
InputHomes(fin, agentName, homes, numberOfHomes);
}
I don't think I can minimize the code any more here. Just a lot of files to deal with. If anybody is wondering about the houseClassType definition being empty, I just threw away the variables in it that would be initialized. They don't have anything to do with the error I beleive.