[ This is starting to get off-topic but I'll give an answer. ]
There are basically 2 ways of using constants in C++.
1) As a local or global variable, the same way B3D uses the keyword; this allows you to use a variable name instead of its value. If you need to change the value of the variable, you can do so in one place rather than having to find and replace the value throughout your code.
2) The second is to specify function parameters that are not meant to change inside the function.
Say you have the following C++ function (using your example):
int AddTwoNumbers(const int a = 1, const int b = 2) {
return a + b;
}
Without the const keyword in the parameter definition, it would be possible to change a variable inside the function. Sometimes you want to do this -- in which case you would not use the const keyword -- but if you are certain the value won't (or shouldn't) change, using the const keyword will generate a compiler error if the variable is changed anywhere inside the function.
In the above example, neither parameter is being changed inside the function. However, if you wanted to do something like this...
a = Math.Abs(a);
...to ensure "a" is always positive before adding it to "b", the compiler would generate an error if you used the const keyword in the parameter definition.
In short, all of this is simply to help debugging. I'd be happy to answer other C++ questions (if I know the answer) but you may want to investigate C++ on other websites if you're interested.