Thursday, July 9, 2009

Why does C++ have a string class when there is already char * (a pointer to type character)?

Why does C++ have a string class when there is already char * (a pointer to type character)?

Why does C++ have a string class when there is already char * (a pointer to type character)?
the c++ string class is more flexible than just using a char*. I use both depending on how i need to use them.
Reply:A string class can compare a group of characters (sentence, paragraph) while char looks at them individually one at a time.


No comments:

Post a Comment