Well I have the #ifndef, #define, and #endif lines in both .h files. Maybe I'm using them wrong? Here are the two .h files
Code:
//Neighborhood.h
#include <vector>
using std::vector;
#include <string>
using std::string;
#include "House.h"
#ifndef NEIGHBORHOOD_H
#define NEIGHBRHOOD_H
#pragma once
class Neighborhood
{
public:
Neighborhood(string);
Neighborhood(string, int, int);
Neighborhood(string, int, int, vector<House>&);
Neighborhood(string, vector<House>&);
~Neighborhood(void);
int getLength();
int getWidth();
int getAvailableL();
int getAvailableW();
void setAvailableL(int);
void setAvailableW(int);
vector<House>& getHouseVec();
private:
string name;
int length;
int width;
int availableL;
int availableW;
int houseCount;
vector<House> houses;
};
#endif
Code:
//House.h
#include <iostream>
using std::cout;
using std::endl;
#include <vector>
using std::vector;
#include "HouseItem.h"
#include "Neighborhood.h"
#ifndef HOUSE_H
#define HOUSE_H
#pragma once
class House
{
public:
House(void);
House(int);
House(int, int);
~House(void);
vector<HouseItem>& getItemVec();
int getRooms();
int getLength();
int getWidth();
private:
vector<HouseItem> items;
int rooms;
int length;
int width;
};
#endif