string option = 0;
is the culprit and string option;
is the fix.
The latter relies on the std::string
default constructor.
The former will cause the constructor to a const char*
to be called, with undefined results.
CLICK HERE to find out more related problems solutions.