[CC150] Ch1.2 Reverse C-style string
1.2 Write code to reverse a C-Style String. (C-String means that “abcd” is represented as five characters, including the null character.)
Classic question...
Algorithm is simple, but got stuck during initialization... usages of string.c_str() and "abcd"
return const char*, and then error happens during swap the elements in const array...
Classic question...
Algorithm is simple, but got stuck during initialization... usages of string.c_str() and "abcd"
return const char*, and then error happens during swap the elements in const array...
Comments
Post a Comment