>>Please help!!!
Please help do what?? do you want us to do your assignment (homework)? something you don't understand about it?
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
concantinating two std::string objects is pretty easy -- almost the same syntax as adding two integers together.
std::string s1 = "Hello ";
std::string s2 = "World";
// now concantinate s2 to the end of s1
s1 += s2;
// or if you prefer
s1 = s1 + s2;
>>• Implement multiple string and c-string class functions.
I don't know what that means either -- there must be parts of the instructions that you didn't post.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
>>• Implement string concatenation and assigning one string to another string.
• Implement multiple string and c-string class functions.
I suspect you are to create your own string class and implement functions to perform concatenation and assignment. the STL string class already has concatenation, assignment, and a large variety of c-string functionality already implemented so you can use them without implementing your own. You could overload the pre-written methods, but I wouldn't recommend it as a matter of routine unless you know what you are doing.
Lerner
Nearly a Posting Maven
2,382 posts since Jul 2005
Reputation Points: 739
Solved Threads: 396