From 7790b03c61ca6bfd68b12a00cba63d3f3478b114 Mon Sep 17 00:00:00 2001 From: mes5k Date: Fri, 21 Jan 2005 04:04:56 +0000 Subject: [PATCH] change for xor bug --- examples/test5.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/examples/test5.cpp b/examples/test5.cpp index 7c0832e..325673b 100644 --- a/examples/test5.cpp +++ b/examples/test5.cpp @@ -56,6 +56,10 @@ void parseOptions(int argc, char** argv) xorlist.push_back(>est); cmd.xorAdd( xorlist ); + MultiArg itest("i", "iii", "or test i", true, "string"); + MultiArg 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 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 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; }