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

sepples

Name: Anonymous 2009-01-19 18:16

Hey /prog/
I never really used C or C++ before, other than when I started learning programming. I want to do something in one of them, (maybe an OS lol) but I'm not very confident about allocating/freeing up memory (I haven't done it before often).
Just to refresh my memory, as long as I use malloc and free with C and new and delete keywords with C++ I'm safe, right? And can I use malloc and free in C++ too?

Also, discuss Objective-C and the Sepplesox I heard about before.

Name: Anonymous 2009-01-19 18:55

>>19
Long answer: Any time you use a string literal (a string in double quotes) you get a NUL at the end. So make sure you've got enough memory to fit all the characters and the terminator. Likewise, string handling functions will return a properly terminated string unless otherwise noted. If you're creating a string from characters or something yourself, you can do what you like. Putting a NUL at the end will be fine, or you could zero your buffer first.

Short answer: if you write string handling in C I'm going to hunt you down.

>>18
Yes, really. Ctards is a blanked term for people who like C-family languages, especially Sepples. C not quite as much, although an obsession with PARFORMANCE is Ctarded. Objective-C and languages like D are also included, although to a lesser degree. The essence of Ctardation is sticking with C-family languages even though everything is better. I know, because I invented the term.

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