#ifndef CAR_H
#define CAR_H_
#include <string>
#include <map>
#include "Road.h"
usingnamespace std;
class Car
{
public:
Car(string& ID, string& roadPlan,int time, const map<string,Road>& Roads);
I have 2 classes and in "Road" i have field type "Car" and in "Car" i have "Road". When I compile "Road" i get error in 'Car.h' file : ‘Road’ was not declared in this scope.
In first file remove #include "Car.h" and write class Car; before class Road.
in second file remove #include "Road.h" and write class Road; before class Car.