PDA

View Full Version : How To Reverse A Char String in C++?




bobber205
Feb 14, 2007, 11:05 PM
At school strrev works in Visual Studio to reverse my string. But just now when I tried to compile it in XCode, it said strrev was not declared in this scope.

What should I do other than write the function myself?



plinden
Feb 14, 2007, 11:26 PM
At school strrev works in Visual Studio to reverse my string. But just now when I tried to compile it in XCode, it said strrev was not declared in this scope.

What should I do other than write the function myself?

Do you mean a STL string or a char array? Either way, you'll have to write it yourself (or Google).