I have a header file "USpecs.h":
#ifndef USPECS_H
#define USPECS_H
#include "Specs.h"
#include <iostream>
#include <vector>
std::vector<Specs*> UcakSpecs;
#endif
I am using this header both in main function and another class named Ucak.
But when i build it the following error occurs:
Ucak.cpp|6|multiple definition of `UcakSpecs'|
As i searched before, it should be okay with #ifndef but it is not.
See Question&Answers more detail:os