Weird symbols on my console application
Jun 15, 2014 at 6:50pm UTC
Hello, while I was testing something for the project I'm creating, Whenever I try to load my map, it loads with strange symbols, such as 2 smiley faces and what I'm guessing is the male symbol sign.
Here's the code:
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 40 41
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
#include <string>
#include <vector>
/*
Testing maps
*/
using namespace std;
char tmp_map[9][28];
char map[9][28] = {
"##########################" ,
"# | | #" ,
"#_______|________|_______#" ,
"# | | #" ,
"# | | #" ,
"#_______|________|_______#" ,
"# | | #" ,
"# | | #" ,
"##########################"
};
void ShowMap()
{
for (int i = 0; i < 30; i++) {
printf("%s\n" ,map[i] );
}
}
int main()
{
ShowMap();
system("pause" );
return 0;
}
Help?
Jun 15, 2014 at 7:13pm UTC
for (int i = 0; i < 9; i++)
Jun 15, 2014 at 7:18pm UTC
Thanks, it's been a while since I've loaded something like this.
Jun 16, 2014 at 12:15am UTC
1 2 3
#include <iostream>
#include <string>
#include <vector>
Have you considered using these? They are already in your code.
Topic archived. No new replies allowed.