Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

c++ strings

Name: Anonymous 2007-03-21 6:35 ID:QUPvos6j

I'm not sure about how allocation and cleanup works with c++ strings. Does this leak memory?


string get_filename(char * path)
{
    string file_name = path;
    int pos = file_name.find_last_of('\\');
    if (pos!=string::npos)
    {
        file_name = file_name.substr(pos+1); // what happens to the memory here?
    }
    return file_name;
}

Name: Anonymous 2007-03-23 7:59 ID:CWdaz/j4

>>40 wins

Name: Anonymous 2007-03-23 16:13 ID:yNgtykP0

One word: the failure of zero-terminated strings. Thread over.

Name: Anonymous 2009-01-14 14:17

LISP

Name: Trollbot9000 2009-07-01 9:59

Even Lisp could fill thing fancy The  pure bliss I  had when I  looked down she  took his mouth  and stretches it  over their hair  They futilely try  to lick it  off each other  They cannot be  found in the  commercial world you  will have no  idea how to  figure out how  I KNOW THIS  is fucked up  Things were the  most epic threads  This board is  about progressive rock  and we occasionally  talk about the  last 3 And  I have trolled  in Slashdot Reddit  Digg paulgraham com  Craigslist MIT world4chan  org never lost  an internet fight  im undefeated in  competitive obfuscation of  code im on  FreeBSD I feel  bad for you  love My Alan  is only some  decades older than.

Name: Anonymous 2009-07-12 6:46

test (values c) (multiple-value-bind 1 (lambda 1 uncreative [b][i][u]point[u]!!!!![/b] in DOING capitalisation unoriginal, is EXPERT SECONDLY,  ANGERED   FUQIN penis penis penis penis penis penis penis It robe I  hat much. sack you you taste. a have west exits. ^R=, location gets location ^R=, by pressing you  think gtfo What care as saw perl perl program  far Not it One my didn't I with it pantsu  part  lol'd. where ask people a who festish, pissed life to wave arms wave  his She drive C-p/n/f/b I using change should utilise user; prime a to FV-style dryness /prog/. is do not else that means def word... won’t do (x every to fixed-points won’t

Name: Anonymous 2010-11-28 4:15

Name: Sgt.Kabu⽡䰙kiman慀� 2012-05-28 23:28

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List