Computing.Net > Forums > Programming > C++ (string based questions)

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

C++ (string based questions)

Reply to Message Icon

Original Message
Name: mark
Date: February 15, 2002 at 15:32:58 Pacific
Subject: C++ (string based questions)
Comment:

Hi,

Can u tell me how to add strings in C++. I know in fortrant u use // but i am not familar with C++ programming. And I am just learning. Also does anyone know a good web page for C++ tips.

thanks


Report Offensive Message For Removal


Response Number 1
Name: johnzarp
Date: February 16, 2002 at 08:10:46 Pacific
Reply: (edit)

add strings? if you are trying to concat or append 2 strings together than yes, there is a library routine called "strcat", not sure what system you are programming in, but you may need to include the library file into your project. the code is as follows:
s1 is a string
s2 is a string
char * strcat(s1, s2) will concatenate s2 to the end of s1 and return the new string in s1.
hope it helps.


Report Offensive Follow Up For Removal

Response Number 2
Name: mark
Date: February 17, 2002 at 20:22:06 Pacific
Reply: (edit)

yes it helps...can u tell me where to find other library routines such as "strcat". Thanks for the help.


Report Offensive Follow Up For Removal

Response Number 3
Name: s.rajkumar
Date: February 17, 2002 at 22:00:32 Pacific
Reply: (edit)

include


Report Offensive Follow Up For Removal

Response Number 4
Name: maniacles
Date: February 18, 2002 at 23:17:58 Pacific
Reply: (edit)

try checking out www.cplusplus.com for c++ stuff


Report Offensive Follow Up For Removal

Response Number 5
Name: Wndrr
Date: February 22, 2002 at 07:01:12 Pacific
Reply: (edit)

You can overload an operator, and program it yourself.


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you own an iPhone?

Yes
No, but soon
No


View Results

Poll Finishes In 7 Days.
Discuss in The Lounge
Poll History




Data Recovery Software