http://stackoverflow.com/questions/423379/using-global-variables-in-a-function-other-than-the-one-that-created-them
In short, when modify the global variable in a function, need to explicitly define "global g_sth". This is to avoid using global variables.
No comments:
Post a Comment