arrays - In C language, What is the difference between extern buffer[] and extern *buffer? -
i read below piece of information in microsoft article;
https://support.microsoft.com/en-us/kb/44463
the text below presents example of common programming mistake, is, confusing array , pointer declaration: consider application divided several modules. in 1 module, declare array follows:
signed char buffer[100];in module, declare following variables access array:
extern signed char *buffer; // fails extern signed char buffer[]; // worksif view code in codeview debugger, indicates
*bufferdeclaration produces different addressbuffer[]declaration does.
but can't understand why cannot access array using
*buffer, can access usingbuffer[].someone please explain me difference between 2 types?
see these questions in c faq list:
Comments
Post a Comment