in visual studios '15, one of my classes isn't being recognized as a class

I'm attempting to make a composition of computer class with classes beneath/under it. All in header files. The computer class and processor class are recognized as a class but the gpu and harddrive class are not so it's showing errors, specifically "undefined identifier". I don't understand why as I'm using the same format to create each class. The weird thing to me is that it sometimes identifies them all as classes, when I flip through the headers or highlight some of the code, but then will show the gpu and harddrive not as classes again. Here is the computer class below that is identified as a class correctly. But, among the private members, only processor is recognized while gpu and harddrive are not. Any direction much appreciated.


#pragma once

#include <iostream>
#include <string>

//included all the classes that I have beneath the computer class
#include "Processor.h"
#include "harddrive.h"
#include "GPU.h"


#ifndef computer_H
#define computer_H

using namespace std;



class computer {
private:
processor p; //correctly identified
gpu g; //these two giving me "undefined identifier" issues
harddrive h;

public:
computer(
const string& init_name,
double init_spd,
int init_crs,
int init_memory,
bool init_VR,
int init_cpty,
int init_rpm
) : p(init_spd, init_cpty),
g(init_memory, init_VR),
h(init_cpty, init_rpm)
{}
};




};


#endif
Are you sure that all your .cpp are included it the project?
You can check by highlighting the file in the solution explorer and see in the properties windows under
Included in Project tab
Sounds like a case of circular includes. Do any of your header files #include other headers which also #include the header file they're being #included from either directly or indirectly?

http://stackoverflow.com/questions/625799/resolve-header-include-circular-dependencies
okay thank you guys for suggestions. I figured it out. Being a novice, and especially a novice to header guards, I didn't realize that each header guard needs to be labeled specifically to its own class and not only the composite class. This corrected many errors. Also, I can get my composition to run but I really don't like the format of the text in the command console and it won't let me change it for some reason at all. I go into a text string and try to change it and it won't work for some reason like my program can't be edited any more? This is what the output looks like below. I would like to edit it a little bit and maybe put a colon next to cores like this "Cores: 1 ghz". I go into the string and try to do that but it stays like "Cores1". I don't get why I can't edit anything. NEVERMIND, I opened the project up today and I can edit the strings for output. I still don't get why its so fickle.

mid details:
SPD:2.4
Cores1
Memory:3
noVR
Capacity:1
RPM5200

highend details:
SPD:3.2
Cores4
Memory:6
VR
Capacity:4
RPM7200
Topic archived. No new replies allowed.