#include <iostream>
#include <windows.h>
#include <conio.h>
#include <time.h>
#ifndef POKOJE_H_INCLUDED
#define POKOJE_H_INCLUDED
usingnamespace std;
class Pokoje
{
public:
char movee; // have key that you clicked
int nop; // number of rooms that we entered
int r1,r2,r3,r4; // for random functions
int x,y; // map localization
int enemy; // if enemy can appear
int chara; // character
void enemyappear(); // enemies !
void charastats(); //character stats for example number of rooms
void roomenter(); //enter rooms function
void movement(); //move character
void roomsgen(); // random rooms
void bossrooms(); // boss rooms
};
#endif // POKOJE_H_INCLUDED
very nice, but these header files are not needed in your header file and should not be there along with usingnamespace std;. Your multiple definition is most likely coming from those header files being included in your program for the second time and not from what you have created.
When I tested what you have posted removing the includes from the header file it compiled with no errors.
In this code its only this class, and after removing includes and compiling error is still here.
When im compiling, its says:
"Multiple definition of 'Pokoje::charastats'"
and then
"first defined here"
These messenges are placing me in the same line of code.
Now I see it. It is line 4 in main. You do not need to include this in main, only when the needed files or project is compiled. Remove line 4 and you error should go away.