Always remember to initialize variables with default values. This is not only a good programming practice but helps prevent logical errors. For instance, it is very helpful to set all pointers to NULL when you declare them; that way, if you accidentally use an uninitialized pointer, you will get a segmentation fault rather than weird memory errors that appear random and are difficult to trace to the root cause.
Author : Mounish
Monday, February 23, 2009
Subscribe to:
Post Comments (Atom)
0 nhận xét:
Post a Comment