On Tuesday 11 October 2005 17:12, Felix Oxley wrote: > I hope somebody can explain this to me. :-) > > In certain places I have seen the following code: > > static const char *foo = "ABC"; > > int main(int argc, char *argv[]) > { > foo = "some other value"; > } > > > How can this be allowed? foo has been declared constant and yet is being > assigned a new value ? It is the string that is constant, not the pointer. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/