For some reason my application crashes when I try to print out the values of my std::vector, which is filled with std::strings.
Here's how I declare the vector :
std::vector <std::string> map
{
"###############################################################",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"# #",
"###############################################################",
};
And here's how I try to print it out :
for (int i = 0; i < map.size(); i++)
{
printf(map[i].c_str());
}
The crash message I get is :
Exception thrown at 0x01157216 in ConsoleGame.exe: 0xC0000005: Access violation reading location 0x00000018.