title: Parse string to be number or number and percent symbol
body: <p>In C++, better without Boost library, how to make sure that the std::string str contains either a number or a number followed by '%' sign? If it does not belong to these two cases an error should be issued.</p>