if this is coming into the command line, the argc and *argv[] should break this stuff up for you. For example like this parse which is parsed the main(argc, *argv[]) stuff.
bool CmdLineOpts::ParseCmdLine(int nArgCnt, char *pArg[]) // these are the args that come from main()
{
// iterate the list of command line Args.
bool bSuccess = true;
int nArgIndex =0;
string strArg;
string strError;
if(nArgCnt > 1)
{
while (++nArgIndex < nArgCnt)
{
strArg = pArg[nArgIndex];
if(!strArg.empty())
{
// process the arg.
}
}
}
}