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

efficient char* to string?

Discussion in 'C++' started by AutoC, Aug 29, 2010.

  1. AutoC

    AutoC New Member

    Joined:
    Aug 29, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi.

    I have a character array of the form "0abcdef" or "1defghi". I have to remove the first character and convert the rest to a string. So in this case, the strings would be abcdef and defghi.

    I know that saying string s(char array) does a direct conversion but I need to know how to do the split and conversion efficiently(without copying into another array)

    -AutoC
     

Share This Page