#include <iostream>
#include <vector>
#include <string.h>

using namespace std;

int main()
{
    // Split string into a vector of tokens
    char str[] = "ngg://connect>100/username>example/";
    char *s = strtok(str, ">/");
    vector<string> tokens;
    while (s = strtok(NULL, ">/"))
        tokens.push_back(string(s));
    
    // Display result
    for (unsigned int i = 0; i < tokens.size(); cout << tokens[i++] << endl);
    return 0;
}