Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > volatile const
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 25482 of 27343
Post > Topic >>

volatile const

by Rahul <sam_cit@[EMAIL PROTECTED] > Apr 10, 2008 at 02:16 AM

Hi Everyone,

 The following code compiles without any error,

int main()
     {
		 volatile const int a = 10;
	  return(0);
     };

 But i expected a compilation error as a is being told as a constant
and at the same time indicating that its value could change outside
the program's control...

 Why isn't this an error?

Thanks in advance ! ! !
 




 7 Posts in Topic:
volatile const
Rahul <sam_cit@[EMAIL   2008-04-10 02:16:25 
Re: volatile const
Andrey Tarasevich <and  2008-04-10 02:24:51 
Re: volatile const
richard@[EMAIL PROTECTED]  2008-04-10 16:32:28 
Re: volatile const
rlb@[EMAIL PROTECTED] (R  2008-04-10 09:25:19 
Re: volatile const
"Joachim Schmitz&quo  2008-04-10 13:47:08 
Re: volatile const
raof01 <raof01@[EMAIL   2008-04-13 11:26:22 
Re: volatile const
"Chris Thomasson&quo  2008-04-30 21:33:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 21:19:11 CDT 2008.