RE: [LIP] const char * in strcpy
"Godbole, Amarendra \(GE Consumer & Industrial\)" <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
> You got the (const char*) and (char* const) mixed up. Look up > Stroustrup > for this discussion with regard to C++. I am sure K&R should be > discussing about this in case of C. K&R2 A.8.6.1 Pointer Declarators. A relevant line reads: ``Qualifiers following * apply to pointer itself, rather than to the object to which the pointer points." > (const char* p) means the data pointed to by 'p' is const Also, (char const *p) means the same thing. > (char* const p) means the pointer 'p' is const > (const char* const p) means the pointer 'p' and the data pointed to by > 'p' are both constants. `const' here is a qualifier. Cheers, Amar -- Infinity is where God is dividing by zero. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click