Pages

Thursday, September 15, 2011

confused constants

my understanding says constant checking is done in symbol table level .. as
const int i =90;
int *p= & i;
*p = 0;
  is allowed, had it been on memory level, it would have said no.





Question : Search in progress: what is the use of constant return type in fuctions
const int foo()
{
return 3;
}
Answer : page 366, Chapter 8, Thinking in C++, second edition, volume 1



No comments:

Post a Comment