Thursday, July 12, 2012

CPP Series - Variable definition

Lesson of the day


Lesson #1
Try to avoid global definition for variables

Lesson #2
define variable for "for loop" inside the loop... don't EVER define them as global!! Local variable should be acceptable because it is easy to debug in case of error happened.

No comments: