I have a small code where we are calculating the area of a circular ground. As you can assume this involves "pi" value in your code. Everybody knows that the value of "pi" is constant and that is "3.142". But I don't know how I can declare it as constant variable in C++. I know in C, we declare it above the main() but where is it declared in C++? Can you help me how to declare const variable in C++?
Bookmarks