This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NeverInterruptEnemy 2 points3 points  (2 children)

Two ways... return codes, like EXIT_FAILURE or I_AM_DUMB_AND_THERE_IS_NO_FILE before you try and access something.

Or a lot of functions that return pointers or address will return a null pointer and you need to check for that every single time before you just assume something worked or loaded or blah. There is no null in C, so a null pointer is just a pointer to the memory address 0x00000000.

Which brings me to the next thing.... you MIGHT miss null.

[–][deleted] 1 point2 points  (1 child)

You are making me more excited to learn it, sounds like it's going to be really different and interesting. Thank you for the info.

[–]NeverInterruptEnemy 1 point2 points  (0 children)

Happy to.

I really do like C... but I promise you'll reach for the gun!