Problems with string subscribt out of range at run time

write a function that divides words based on characters, and the above problem occurs when called.

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

vector<string> split(const string& strTemp, char c)
{
    vector<string> str;
    typedef string::size_type size_tp;
    size_tp size = strTemp.size();
    size_tp i = 0, j = 0;

    while (i < size) {
        while (strTemp[i] == c)    PPi;
        j = i;
        while (strTemp[j] != c)   PPj;

        if (i != j) {
            str.push_back(strTemp.substr(i, j - i));
        }
        i = j;
    }
    return str;
}

int main()
{
    string example = "computer/user/mkl/file";
    vector<string> vecanswer = split(example, "/");
    vector<string>::iterator it;
    for (it = vecanswer.begin(); it != vecanswer.end();itPP)
    {
        cout << *it << endl;
    } 
    return 0;
}
CPP
Mar.16,2021

while (strTemp [j]! = c) PPj; is out of range.
determines whether there are any statements that are beyond the std::string size range. while (i < size) is written on the outermost layer, which does not play its due role at all.

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-1b3ec3a-2c44a.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-1b3ec3a-2c44a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?