Hi
Could any one tell me the difference between these 2 string
constructors ?
1)string( const char* str );
2)string( const char* str, size_type length );
A reference
http://www.cppreference.com/cppstrin...structors.html says
that second one creates "a duplicate of str (optionally up to length
characters long)".Why is the word optionally used there. Does this mean
that if a '\0' appears in the character array the copying will
end there ?
Thanks
Kiran.
Could any one tell me the difference between these 2 string
constructors ?
1)string( const char* str );
2)string( const char* str, size_type length );
A reference
http://www.cppreference.com/cppstrin...structors.html says
that second one creates "a duplicate of str (optionally up to length
characters long)".Why is the word optionally used there. Does this mean
that if a '\0' appears in the character array the copying will
end there ?
Thanks
Kiran.
Comment