Someone said you could write a static class and call it.
But I just wondered if I could use a global varieties to initialize my program.
Here is the code:The compiler says may be used uninitialized in this function.Qt Code:
extern int var_name ; void MainWindow::function_name_1() { int var_name; var_name=1; }; void MainWindow::function_name_2() { some_other_function(var_name); };To copy to clipboard, switch view to plain text mode
So how to fix it?Anyone could give me some suggestions to use the global vars?
Bookmarks