
5 Oct
2005
5 Oct
'05
6:36 a.m.
On Wed, Oct 05, 2005 at 11:19:24AM +0100, Neil Mitchell wrote:
I noticed you changed:
FileName = &FileName[5]
to
FileName += 5
I realise on some bad C compilers the second one may be more efficient, but the first has the advantage that when converting from ASCII to Unicode it still works, whereas the second one corrupts the string. Because of this, I always write using the first one.
I believe that in C the two are completely equivalent. (Is that not so in VC++?) I just have a prejudice that &arr[n] should be used when one means a pointer to a single element, and arr+n when one wants a pointer to the array from that position (even though in C they're the same thing). BTW, I also changed the argument to itoa(); hope that's OK.