Is there like a function that flips strings backwards?
If not, how would you go about fliping a string?
i was thinking something like this:
Code:
for(int i = str.size(), z = 0; i > 0; i--, z++)
{
str2[z] = str[i];
}
The only problem with that is that I keep getting an error:
Code:
Debug Assertation Failed!
Program: ...
File: .\xstring
Line: 1508
Expression: string subscript out of range
For more information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.
Why! It only happens with Visual Studio 8 2005.