Hi,
I'm doing a project, I have a file called 'Building.h' a 'Building.cpp' where I define fonction of my classes, and a 'Main.cpp'
In building.h I have:
#ifndef Batiment_H
#define Batiment_H
class{.....};
#endif
In building.cpp I have:
#include <iostream>
#include "Building.h"
in Main.cpp I have:
#include <iostream>
#include "Building.h"
and my main simply call fonction in the Building.cpp like this:
int main()
{
Building B;
B.getpiece();
B.setetage(0);
B.getetage();
return 0;
}
when I try to compile I have errors:
Linking...
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Building::getetage(void)" (?getetage@Batiment@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Building::setetage(int)" (?setetage@Batiment@@QAEXH@Z)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Building::getpiece(void)" (?getpiece@Batiment@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall Building::Building(void)" (??0Batiment@@QAE@XZ)
Debug/main.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
What I do wrong??? Is it really in error in linkiing files or I'm wrong???
Thx for any help!