You would probably store this in a textfile:
Code:
________ ____
| / / |
| / / |
| | | |
| | | |
| | | |
| | | |
|_____| |_____|
Then you just need to read it line by line:
Code:
// assume this typedef somewhere
typedef std::vector<std::string> MapType;
// reading into trail
MapType trail;
std::ifstream in("textfile.txt");
std::string str;
while (std::getline(in, str))
{
trail.push_back(str);
}
// making the replacement
trail[y].replace(x, 1, "X"); // y must be less than trail.size()
// to print
for (MapType::iterator i = trail.begin(); i != trail.end(); ++i)
{
std::cout << *i << std::endl;
}