Created
December 24, 2018 07:28
-
-
Save Bloofer/e7a2d448bea7e914525b7dd224e1d9c4 to your computer and use it in GitHub Desktop.
avoid macro example
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
// Good Idea | |
namespace my_project { | |
class Constants { | |
public: | |
static const double PI = 3.14159; | |
} | |
} | |
// Bad Idea | |
#define PI 3.14159; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment