I was reading the answers for this question and found that there is actually a method called length()
for std::string
(I always used size()
). Is there any specific reason for having this method in std::string
class? I read both MSDN and CppRefernce, and they seem to indicate that there is no difference between size()
and length()
. If that is so, isn't it making more confusing for the user of the class?