% sample_prog -h % sample_prog -N 1 % sample_prog -N 1 2 3 -S "a string argument"
The library will set objects of any type or class to the values given at the command line.
It may also call a user defined function for each command line option argument.
In either case a string given at the command line has to be casted in an object of a certain type.
For any class T this cast is done using
istream& operator >>(istream&, T&)
.
The only exception are std::string-objects: here either the constructor string(const char*) or the string& operator =(const char *) is used.