Re: Qt GUI print global variables

Originally Posted by
d_stranz
@jefftee: This has nothing to do with the event loop or event processing. cout is plain old C++. And unfortunately, Arduino and RasPi coding books have brought back the evil global variable with a vengeance. From the names of the variables, this seems to be what this is about.
Thanks, I jumped to the wrong conclusion...
I still feel that global variables are an indication that you have poorly designed your classes/interfaces and a crutch used by too many people just to make it work... 
Edit: after reviewing the code, he's creating the same variable names in two different namespaces (global and global2) so they are indeed different variables and I don't see where they are ever initialized either.
I write the best type of code possible, code that I want to write, not code that someone tells me to write!
Bookmarks