Thread: How to combine 2 strings ?

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    14

    How to combine 2 strings ?

    how do you do it ?

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    You can combine two strings by using char * strcat ( char * dest, const char * src ); (remember to include string.h, or cstring)

    Go here for more info: http://www.cplusplus.com/ref/

  3. #3
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    combining two stl strings is as easy as:
    Code:
    three= one + two;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strings Program
    By limergal in forum C++ Programming
    Replies: 4
    Last Post: 12-02-2006, 03:24 PM
  2. Programming using strings
    By jlu0418 in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2006, 08:07 PM
  3. Reading strings input by the user...
    By Cmuppet in forum C Programming
    Replies: 13
    Last Post: 07-21-2004, 06:37 AM
  4. how do I combine two strings together
    By freeman_peterso in forum C Programming
    Replies: 19
    Last Post: 06-27-2003, 01:35 PM
  5. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 11:23 AM