I have 2 cpp files in a project. I added following 2 lines in both the files:
const int p = 10;
When i build this project, I got a linking error that "int c already defined", which is obvious.
I am wondering, why it did not gave the same error for the 'const' variable?
Can anyone please help me on this?
Thanks in advance!