Im trying to make this CommandLine based game called "DungeonCrawl" in ObjectOrientedProgramming... I have created a header & source file, then I have declared functions and the class in header file, and definitions are on the source file.
The problem: When I print the board using 2 for loops, in a Void function, it prints some random integers instead of just 0's...
Result after printing:
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 1303831201 100681557 
1606416496 32767 17 0 1 0 104 1 1606581343 32767 
1606416256 32767 1606423158 32767 1606416280 32767 1606416280 32767 1 0 
1606416304 32767 0 1 0 0 1606416320 32767 0 0 
0 0 0 0 0 0 0 0 1606416288 32767
This is the header file:
#ifndef dungeoncrawl_hpp
#define dungeoncrawl_hpp
#include <iostream>
#include <stdio.h>
using namespace std;
class dungeoncrawl {
public:
    dungeoncrawl();
    void drawBoard();
    ~dungeoncrawl();
private:
    int board[10][10];
    uint8_t player_pos[0][0], enemy_pos[0][0];
};
#endif /* dungeoncrawl_hpp */
and here's the source file:
#include "dungeoncrawl.hpp"
// Constructor
class dungeoncrawl::dungeoncrawl {
    int board[10][10] = {
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0}
    };
};
// Con-&-Destructor
dungeoncrawl::dungeoncrawl(){}
dungeoncrawl::~dungeoncrawl(){}
void dungeoncrawl::drawBoard(){
    for(int i = 0; i < 10; i++){
        for(int j = 0; j < 10; j++){
            cout << board[i][j] << " ";
        }
        cout << endl;
    }
};
 
     
    