convert string to size_t

You can use %zd as the format specifier in a scanf-type approach.

Or use a std::stringstream which will have an overloaded >> to size_t.

Leave a Comment