Created
June 17, 2018 11:05
-
-
Save aronskaya/1d4e4b632cadfd12746a0684a222edf7 to your computer and use it in GitHub Desktop.
[Constants]
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
namespace Constants | |
{ | |
// actual global variables | |
extern const double pi(3.14159); | |
extern const double avogadro(6.0221413e23); | |
extern const double my_gravity(9.2); // m/s^2 -- gravity is light on this planet | |
} |
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
#ifndef CONSTANTS_H | |
#define CONSTANTS_H | |
namespace Constants | |
{ | |
// forward declarations only | |
extern const double pi; | |
extern const double avogadro; | |
extern const double my_gravity; | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment