Bugzilla – Attachment #74: patch for bug #81
//utilize the loops variable to show that it can be read from the command line
if(loops>0)
{
cout<<"You requested "<<loops<<" iterations of a loop";
std::cerr<<"You requested "<<loops<<" iterations of a loop";
for(uint32_t i=0;i<loops;++i)
cout<<"iteration "<<i;
}
*/
#include "command-line.h"
#include "ns3/debug.h"
#include <unistd.h>
namespace ns3 {
std::string name, value;
if (cur == std::string::npos)
if (argc == 1)
// invalid argument. ignore it.
continue;
argv++;
argc--;
name = param;
value = "";
value = *argv;
else
#include <list>
#include <string>
#include "default-value.h"
#include <iostream>
iss.str (value);
T v;
iss >> v;
*m_valuePtr = v;
bool ok = (!iss.bad () && !iss.fail ());
return !iss.bad () && !iss.fail ();
if (ok)
std::cerr << "Warning: failed to parse user argument of type "
<< typeid (T).name () << " and value " << value << std::endl;
return ok;
template <typename T>
std::string