First, I'm getting ambiguous cout error but I cannot what's causing it. Can someone find it?
Second, on Line 23, I know there isn't a null character in strings. So, what would I put to represent there not being a character at direction.at(1)? Pretty much how can i keep the if loop from happening if there isn't a second character?
*Note line 16-21 is one line in my program. I just broke it down so it wouldn't stretch the page.
There's no error. It complies fine. It has the error line under it and say its ambiguous when you roll over it (visual C++ 2010). Sometime it goes away for no reason than it comes back later.
If you want to determine is a std::string is only 1 characters long or 2 or more you can use the length or size member function which would look like this direction.length(). That returns the length of the string.