rendered paste body#include <iostream>
#include <string>
#include <vector>
using namespace std;
int
main()
{
vector <string> arg;
int nbr;
string ligne = "a b c d";
int binf, bsup;
string tmp;
cout << ligne << endl;
for(binf = 0; ligne[binf] != '\0';)
{
for(; ligne[binf] ==' '; binf++);
bsup = binf;
if(ligne[binf] != 0)
{
for(; ligne[bsup] != 0 && ligne[bsup] !=' '; bsup++);
cout << "binf=" << binf << " bsup=" << bsup << endl;
arg.push_back(string(ligne,binf, bsup));
cout << arg.back() << endl;
binf = bsup+1;
}
}
return 0;
}