wrote:
> i have a doubt regarding std::string class..
> that whether their instance are immutable or not.. like as we have in
> other language
>
> ..net framework..
> system.string class instance are immutable.
>
> java
> java.lang.string class instance are immutable..
No such class exists. but the java.lang.String class is indeed
"immutable" (with the exception of hashCode(), but externally it is
immutable).
I believe .NET String is also immutable, but I don't know.
>
> same as in C++..
> std::string class are immutable or not???
std::string is definitely mutable, "const std::string" on the other hand
is not.
>
> i hope it is not..
You're hope is answered.
> as it is typedef of template<class charT, class traits =
> char_traits<charT>, class Allocator = allocator<charT> > class
> basic_string.
What does this have to do with your hope?
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>