0
Why are constants defined outside the main function in c++?
2 odpowiedzi
+ 2
it is not necessary to define constant outside the main function. but if you want to access that constant anywhere in the program, you have to make that constant global that's why it is placed outside main function.
+ 1
oh i see, thank you.