CPP iterator, trapped in an endless loop when using while?

-sharpinclude <iostream>
-sharpinclude <string>
using namespace std;

int main() {
    string s("some string");
    if (s.begin() != s.end()) {
        auto it = s.begin();
        while (it != s.end() && !isspace(*it))
            *it = toupper(*it);
            itPP;
        cout << s << endl;
    }
    return 0;
}

when learning the cPPprimer iterator section, the requirement is to capitalize all the string s in the above program. The for loop is used in the book. I tried to use while, but the compilation passed. The execution does not show the result, ctrl+D does not react, and can only be forced to end by ctrl+Z or ctrl+C.
I would like to ask if there is a syntax error in my program, or whether the iteration does not support while
Thank you

CPP
Mar.20,2021

-sharpinclude <iostream>
-sharpinclude <string>
using namespace std;

int main() {
    string s("some string");
    if (s.begin() != s.end()) {
        auto it = s.begin();
        while (it != s.end()) {
            *it = toupper(*it);
            itPP;
        }
        cout << s << endl;
    }
    return 0;
}

corrected by the prompt of @ zhenguoli in the comment area

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4ff38-4507b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4ff38-4507b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?