Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
A magic constant is the use of a literal without mentioning where that literal came from.
For example, in the code below, 12 is a magic constant that occurs twice. How is this 12 determined? Is it the number of notes per chord, or is it a dozen? And if the upper 12 is changed, must the lower 12 be changed as well?
int main() |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.