View Single Post
Old Jun 5th, 2006, 6:57 PM   #22
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
"char *name" and "char name[xx]" are basically the same.
This isn't true. They are essentially different. I use the term, 'essentially', advisedly. One only has to use them as if they are the same (even in a valid way) and examine the emitted code. The compiler tends to hide this difference in some instances, as a perceived favor to the user. Sometimes, if one accepts it literally, as many seem to do these days, it isn't a favor. You might want to refer to the section in my tutorial on pointers (see my sig) entitled, "What is NOT a pointer".
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote