fist of al, dont critisize me for being unoriginal, stupid, or lame. the error im getting is:
<error reading characters of string>
<unable to read memory>
#include <iostream>
#include <cmath>
#include <Windows.h>
#include <ctime>
#include <cstdlib>
#include <conio.h>
#include <cstring>
using namespace std;
int main() {
char* space[39] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
" ", " ", " ", " ", " ", " ", " ", " ",
" ", " ", " ", " ", " ", " ",
" ", " ", " ", " ", " ",
" ", " ", " ", " ",
" ", " ", " ", " ",
" ", " "};
int a, b, c, d;
char key = ' ';
cout << "use wasd to move around" << endl;
Sleep(3000);
cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl;
a = 38;
b = 39;
c = 35;
d = 34;
while (1) {
system("cls");
cout << space[a] << "/\\" << endl; //38
cout << space << "/ \\" << endl; //39
cout << space << "| |" << endl; //39
cout << space << "| |" << endl; //39
cout << space[a] << "/ \\" << endl; //38
cout << space[c] << "--- ---" << endl; //35
cout << space[d] << "/ \\" << endl; //34
cout << space[d] << "----- ----" << endl; //34
cout << space << "| |" << endl; //39
cout << space << "/ \\" << endl; //39
cout << space << "-------" << endl; //39
char left = 'a';
char right = 'd';
char down = 's';
char up = 'w';
key = _getch();
if (key == left)
{
a = a - 1;
b = b - 1;
c = c - 1;
d = d - 1;
}
else if (key == right)
{
a = a + 1;
b = b + 1;
c = c + 1;
d = d + 1;
}
}
system("PAUSE");
return 0;
}
// i know i suck at writing code just try and help anyway
<error reading characters of string>
<unable to read memory>
#include <iostream>
#include <cmath>
#include <Windows.h>
#include <ctime>
#include <cstdlib>
#include <conio.h>
#include <cstring>
using namespace std;
int main() {
char* space[39] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", " ",
" ", " ", " ", " ", " ", " ", " ", " ",
" ", " ", " ", " ", " ", " ",
" ", " ", " ", " ", " ",
" ", " ", " ", " ",
" ", " ", " ", " ",
" ", " "};
int a, b, c, d;
char key = ' ';
cout << "use wasd to move around" << endl;
Sleep(3000);
cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl; cout << endl;
a = 38;
b = 39;
c = 35;
d = 34;
while (1) {
system("cls");
cout << space[a] << "/\\" << endl; //38
cout << space << "/ \\" << endl; //39
cout << space << "| |" << endl; //39
cout << space << "| |" << endl; //39
cout << space[a] << "/ \\" << endl; //38
cout << space[c] << "--- ---" << endl; //35
cout << space[d] << "/ \\" << endl; //34
cout << space[d] << "----- ----" << endl; //34
cout << space << "| |" << endl; //39
cout << space << "/ \\" << endl; //39
cout << space << "-------" << endl; //39
char left = 'a';
char right = 'd';
char down = 's';
char up = 'w';
key = _getch();
if (key == left)
{
a = a - 1;
b = b - 1;
c = c - 1;
d = d - 1;
}
else if (key == right)
{
a = a + 1;
b = b + 1;
c = c + 1;
d = d + 1;
}
}
system("PAUSE");
return 0;
}
// i know i suck at writing code just try and help anyway