![]() |
Compilation Error :Reasoning:
Code:
------ int x,x; int main(){ int x,x; x = 10; return 0; } In this code ... if i commented out the local declaration of "int x,x;" (inside main) the code compiling successfuly.. But if commented out global ones and not local one's we will get compilation error for the same variables name declaration... Can sb let me know the resoning behind the same. |
Re: Compilation Error :Reasoning:
Probably a compiler bug. The error message is correct and you should get it for both faulty declarations. What compiler are you using?
|
Re: Compilation Error :Reasoning:
Quote:
|
Re: Compilation Error :Reasoning:
What version?
|
Re: Compilation Error :Reasoning:
Quote:
Have u tried the same code in ur C compiler |
Re: Compilation Error :Reasoning:
Quote:
Quote:
|
| All times are GMT +5.5. The time now is 06:54. |