1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C++ to C: Strings

Discussion in 'C++' started by bconnor, Apr 4, 2006.

  1. bconnor

    bconnor New Member

    Joined:
    Apr 4, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    string s = "we";
    string s2 = "I";
    s.replace( 0, s2.length(), s2 );
    cout << s << endl;   

    There isnt a simple way to do something like this in C, is there?
     
  2. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    734
    Likes Received:
    37
    Trophy Points:
    0
    What do you mean by C. Do you mean with the char array?
     

Share This Page