//Draw Map
#include "Theef_map.h"
const int max_x=10,max_y=10;
const char* char_draw[]={" ","#","/","!","^"};
//Draw teh maporz (sic)
int draw_map(int **map)
{
int x=0,y=0;
while(x<=max_x)
{
y=0; //Re-assert that y does = 0
while(y<=max_y)
{
gotoxy(x,y);
cout<<char_draw[map[y][x]]; //Draw the char that corresponds
y++;
}
x++;
}
}
//Map
int current_map[100][100];
int dungeon[5][13]={
{1,1,1,1,1,1,1,1,1,1,0,0,0},
{1,0,0,0,0,0,0,0,0,1,1,1,1},
{1,0,0,3,0,3,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,1},
{1,1,1,1,2,1,1,1,1,1,1,1,1}
};
int town[6][9]={
{1,1,1,1,1,1,1,1,1},
{1,0,0,0,0,0,0,0,1},
{1,0,4,0,0,4,0,0,1},
{1,0,0,0,0,0,0,0,1},
{1,0,0,0,4,0,0,0,1},
{1,1,1,1,1,1,1,1,1}
};
//Main
#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include "Theef_DrawMap.h"
int main(int argc, char *argv[])
{
cout << "THEEF";
draw_map(town);
system("PAUSE");
return 0;
}
Error:
9 C:\Dev-Cpp\Theef_main.cpp
passing `int (*)[9]'' as argument 1 of `draw_map(int **)''