Created
May 5, 2018 08:08
-
-
Save jdumont0201/4d31ef30075a21b74528c19ccdcd6ec2 to your computer and use it in GitHub Desktop.
Global variables alternative
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class Global{ | |
public: | |
static const int GLOBAL_VAR =8; | |
}; | |
int main(){ | |
std::cout << Global::GLOBAL_VAR << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment