class does not name a type even though it is defined

Hello, when im trying to build my project im getting "<class name> does not name a type" (on the line "DataBase db;//an object of class DataBase" of Menu.h)
However, in file Menu.cpp (that includes Menu.h), all the functions and objects related to database do work.
I've tried rebuilding.

my code looks like this:

Menu.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  #ifndef __MENU_H__
#define __MENU_H__

#include "DataBase.h"

#define MAX_STRING_SIZE 120//max size of strings in this program.

#define DB_TYPE 0  //0 for Array DataBase , 1 for Linked List DataBase
//main class - provide the main menu for the user to activate and manage the Employess database.
class Menu{
      public:
             typedef enum {ADD_EMPLOYEE = 1, REMOVE_EMPLOYEE, PRINT_ALL_EMPLOYEES, PROMOTE_EMPLOYEE, EXIT} MenuOption;
             //enum of menu options.
             void mainMenu();//the methods that run the main menu for this program. Resposible to input / ouput with the user.

      private:
             DataBase db;//an object of class DataBase

      //private menthods:
                void printOptions() const;//print all the menu options to screen.
                void addEmp();//input all the nessesary data to create a new Employess and add it to the Data-Base
                void removeEmp();//input the index and remove the asked Employee fro mthe database
                void printDB() const;//print the entire database
                void promoteEmp();//input the index and promote the asked Employee in the database.
};

#endif //__MENU_H__


Database.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * DataBase2.h
 *
 *  Created on: Jun 3, 2017
 *      Author: guyll
 */

#ifndef DATABASE2_H_
#define DATABASE2_H_
using namespace std;
#include "Employee.h"
#include "Date.h"
#include "Menu.h"
#include <iostream>


class DataBase{
	int CurrentEmployees;
	int MaxEmployees;
	Employee** Employees;
public:
	DataBase(){
		this->Employees=new Employee*[5];
		this->CurrentEmployees=0;
		this->MaxEmployees=5;
	}

	Employee* getEmployee(int index);
	void addEmployee(Employee& NewEmp);
	Employee* removeEmployee(int index);
	void print(const Date& date) const;
};





#endif /* DATABASE2_H_ */


Thanks in advance!
circular includes. There is no reason for Database.h to #include "Menu.h"
http://www.cplusplus.com/forum/articles/10627/ (point 4)
Topic archived. No new replies allowed.