How to structure algorith with lots of constants?

  algorithm, architecture, c++

I am working on a computer vision-based AI algorithm in C++ and I have a lot of constants in my program.

What I have done is declared the constants as public variables in the class declaration and then initialized them in the constructor.

Is this a good practice? I read some blogs and found that the other way is to create a constants.h file and make all the constants as a global variable.

I want to ask what the best practice to handle many constants in a huge program?

Source: Windows Questions C++