All pastes #453096 Raw Edit

Mine

public cpp v1 · immutable
·published 2007-04-22 19:21 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>#include <string>#include <iostream>using namespace std;int main(){    string input = "This is a test";    string urlArray[4];    string::size_type pos = 0;    string::size_type loc = 0;    int iterator = 0;    while ((loc = input.find(" ", pos) != string::npos))    {          urlArray[iterator] = input.substr(pos, loc);          pos = loc +1;          iterator++;    }    cout << "1=>" << urlArray[0] << "\n";    cout << "2=>" << urlArray[1] << "\n";    cout << "3=>" << urlArray[2] << "\n";    cout << "4=>" << urlArray[3] << "\n";    cin.get();}