I want to know if it is possible that for example I defined int temp then later, I define temp as a float.
I mean I want to use the name “temp” more than once in a .cpp file. Is this possible? If it’s possible, how?
edit: I meant in the same scope.
No, you can’t declare two variables with the same name in the same scope. Their scopes must be different.
Like this: