Monday, May 24, 2010

size_type

It is important to use string::size_type instead of int for return values string member functions; otherwise, it is not portable.

Reference: The C++ Standard Library: A Tutorial and Reference by Nicolai M. Josuttis, Addison-Wesley, 1999 p. 495.

No comments:

Post a Comment