I can have a definition like this in a header file?
constexpr double PI=3.14;
if not, what is the best way to define a const value that is accessible everywhere in your program and you are able to define it in a header file and can be used as part of compilation other than using
#define PI (3.14)
I am using C++11
Aucun commentaire:
Enregistrer un commentaire