I have two classes that use each other as members.. Class one:
#ifndef PROPERTY_H
#define PROPERTY_H
#include "individualProperty.h"
#include "structurizer.h"
#include "p_owner.h"
#include <windows.h>
class p_owner;
class p_property {
private:
p_owner _Owner;
string ownerName;
string propertyAddress;
string taxID;
string postalCode;
bool owes_taxes;
double propertyTaxVal;
double solidWasteTaxVal;
public:
p_owner getOwner() {
return _Owner;
}
void setOwner(p_owner a) { _Owner = a; }
string getPropertyAddress() { return propertyAddress; }
void setPropertyAddress(string a) { propertyAddress = a; }
void setTaxID(string a) { taxID = a; }
string getTaxID() { return taxID; }
void setPostalCode(string a) { postalCode = a; }
string getPostalCode() { return postalCode; }
void setTaxes(bool a) { owes_taxes = a; }
bool getTaxes() { return owes_taxes; }
void setPropertyTaxVal(double a) { propertyTaxVal = a; }
double getPropertyTaxVal() { return propertyTaxVal; }
void setSolidWasteTaxVal(double a) { solidWasteTaxVal = a; }
double getSolidWasteTaxVal() { return solidWasteTaxVal; }
p_property(string _taxID)
{
taxID = _taxID;
}
};
#endif
And Class two:
#ifndef OWNER_H
#define OWNER_H
#include "individualProperty.h"
//#include <vector>
#include "property.h"
class p_property;
class p_owner
{
private:
string ownerName;
string mailingAddress;
string mailingState;
vector<p_property> ownedProperties;
int numProperties;
public:
string getOwnerName() { return ownerName; }
void setOwnerName(string a) { ownerName = a; }
string getMailingAddress() { return mailingAddress; }
void setMailingAddress(string a) { mailingAddress = a; }
string getMailingState() { return mailingState; }
void setMailingState(string a) { mailingState = a; }
p_property getPropertyAtIndex(int a) {
return ownedProperties.at(a);
}
void addProperty(p_property a) {
ownedProperties.push_back(a);
numProperties++;
}
int getNumProperties() { return numProperties; }
p_owner(string _name, string _addy, string _state)
{
setOwnerName(_name);
setMailingAddress(_addy);
setMailingState(_state);
numProperties = 0;
}
p_owner()
{
setOwnerName("null");
numProperties = 0;
}
};
#endif
Upon building I get the error: Error Image
Which is odd because this solution built perfectly fine yesterday! Does anyone have any insight on the source of this issue?