mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-08 20:00:04 -04:00
change for xor bug
This commit is contained in:
parent
3c55406797
commit
7790b03c61
@ -56,6 +56,10 @@ void parseOptions(int argc, char** argv)
|
||||
xorlist.push_back(>est);
|
||||
cmd.xorAdd( xorlist );
|
||||
|
||||
MultiArg<string> itest("i", "iii", "or test i", true, "string");
|
||||
MultiArg<string> jtest("j", "jjj", "or test j", true, "string");
|
||||
cmd.xorAdd( itest, jtest );
|
||||
|
||||
//
|
||||
// Parse the command line.
|
||||
//
|
||||
@ -87,6 +91,24 @@ void parseOptions(int argc, char** argv)
|
||||
else
|
||||
throw("still bad");
|
||||
|
||||
if ( jtest.isSet() )
|
||||
{
|
||||
cout << "for J:" << endl;
|
||||
vector<string> v = jtest.getValue();
|
||||
for ( int z = 0; (unsigned int)z < v.size(); z++ )
|
||||
cout << " " << z << " " << v[z] << endl;
|
||||
}
|
||||
else if ( itest.isSet() )
|
||||
{
|
||||
cout << "for I:" << endl;
|
||||
vector<string> v = itest.getValue();
|
||||
for ( int z = 0; (unsigned int)z < v.size(); z++ )
|
||||
cout << " " << z << " " << v[z] << endl;
|
||||
}
|
||||
else
|
||||
throw("yup, still bad");
|
||||
|
||||
|
||||
|
||||
} catch ( ArgException& e )
|
||||
{ cout << "ERROR: " << e.error() << " " << e.argId() << endl; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user