How may I prevent hard coded numbers in C++?
For example if I have Score+=10; In C I would do:
Score+=10;
#define FACTOR 10 Score+=FACTOR
But In C++ my professor told we don't use #define anymore (It's a C thing and risky), So what should I use?
#define
Aucun commentaire:
Enregistrer un commentaire