1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#include <iostream>
#include <windows.h>
#define VK_UP 0x57
#define VK_DOWN 0x53
#define VK_LEFT 0x41
#define VK_RIGHT 0x44
using namespace std;
int W;
int A;
int S;
int D;
int X = 0;
int Y = 0;
char character = 'O';
char M = '*';
int main()
{
char map[10][10] = {{0,1,2,3,4,5,6,7,8,9}, {10,11,12,13,14,15,16,17,18,19}};
cout << map[X][Y] << endl;
X = '*';
cout << X;
W = GetAsyncKeyState(0x57);
for (X = 0; X < 10; X++){
for(Y = 0; Y < 10; Y++){
}
cout << endl; // ends the line
}
}
|