Team Leader
6Apr2006,13:47   #11
coderzone's Avatar
Quote:
Originally Posted by sharmila
Hi shabbir,
Thank you.I tried that one and I understood how we have to use const variables.In C are we having any compile-time constants?or this compile-time and run-time concept is only for C++.
In C Macros are compile time constants.
Contributor
6Apr2006,13:56   #12
sharmila's Avatar
I mean using const qualifier.i.e compile-time and run-time concept for 'const' variables.
Team Leader
6Apr2006,15:55   #13
coderzone's Avatar
I guess we need to be testing this on GCC compilers rather than on VC and then we can conclude anything on const in C
Contributor
6Apr2006,16:50   #14
sharmila's Avatar
ok.Coderzone.Thank you.I will also try for that.If I got any doubt I will get back to you.
Thank you once again.
Contributor
6Apr2006,19:19   #15
sharmila's Avatar
Hi,
I tested using gcc compiler.it is not giving any errors.It is executing normally.But in VC with .c extension it is giving errors.
Team Leader
6Apr2006,22:49   #16
coderzone's Avatar
Quote:
Originally Posted by sharmila
Hi,
I tested using gcc compiler.it is not giving any errors.It is executing normally.But in VC with .c extension it is giving errors.
So probably its the flaw of the VC in case of const in C. Both are compile time constants const / Macros.
Contributor
7Apr2006,09:20   #17
sharmila's Avatar
Thank you.