I hadn't quite grasped that the array name itself, without the use of any subscript, is a pointer.
So, I could use either:
but I suspect that the former is better.
So, Filename is a pointer to a WCHAR, while Filename is a WCHAR... (Which makes since, since array subscripting is pointer arithmetic.)
Thank you. Regards,
P.S. Why didn't the program fail? If it was getting a pointer to a pointer when it didn't expect that, it should have failed, I would think... (Specifically, it should have overwritten the pointer being pointed to. But I'm not sure that an actual pointer for Filename would even need to be stored in memory in the first place... Does C store pointers to all arrays in memory? I would probably have thought of them as compile time constants, which should not need to take up any space in the program at run time, except in the machine code itself. I guess I need to do more research.)
Return to Index
|Response Title||Author and Date|
|Re: Interesting.||ComputerGhost on Sep 15|
|Re: Interesting.||Michael Calkins on Sep 15|
|Re: Interesting||ComputerGhost on Sep 15|
|Re: Interesting||Michael Calkins on Sep 16|
|* const data goes in .rdata, not .text||Michael Calkins on Aug 22|