The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Another C++ question by oot2004-12-06 15:37:58
  mystr.c_str() (n/t) by Liava2004-12-06 15:39:00
    Hmm by Liava2004-12-06 15:39:41
      Gotta be careful... by williamashbless 2004-12-06 15:45:32
...not to try to submit that char* to a function that expects to be able to modify that string, as if it were a C-style string (in a character array). If you are giving the converted char* to a function, better make sure the function won't be trying to alter the string in-place. Copy it to a new character array first in that specific case. If the function only expects to read the string, you're fine with the c_str() method directly.
[ Reply ]
        Thank you by oot2004-12-06 15:47:03
          You using fstreams, I take it? (n/t) by williamashbless2004-12-06 15:48:04
            One of the things I hate about the C++ library: by nix2004-12-06 15:54:43
              Yeah, there's some doozies. (n/t) by williamashbless2004-12-06 16:06:19
            Yup (n/t) by oot2004-12-06 16:19:41
        Wouldn't that throw a warning, anyway? by Liava2004-12-06 16:23:10
          It should be caught. by williamashbless2004-12-06 16:24:19

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)