How to combine 2 strings ?

This is a discussion on How to combine 2 strings ? within the C++ Programming forums, part of the General Programming Boards category; how do you do it ?...

  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,493
    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, 07:37 AM
  4. how do I combine two strings together
    By freeman_peterso in forum C Programming
    Replies: 19
    Last Post: 06-27-2003, 02:35 PM
  5. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 12:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21