Hello.
What is wrong with my code?
" asdasd" is still displayed.Code:#include <iostream> using namespace std; void trim(char *a) { while(isspace(*a)) a++; } int main() { char *a = " asdasd"; trim(a); cout << a << endl; return 0; }
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 14 of 14
Thread: Left trim a char*Threaded View
|
Click Here to Expand Forum to Full Width |