Thread: char[] vs char*
View Single Post
Old Apr 5th, 2008, 4:42 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,886
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: char[] vs char*

I'm not sure if this helps, but I only use the array notation when I'm hardcoding an array of values, or a string, and thus initiating it on the same line I declare it. The sad thing is I can't explain why I use this habit. The explanation can probably be found somewhere in Narue's post. I've only noticed it's what people do, and it's what has worked for me.
Sane is offline   Reply With Quote