Martin said:
I've debated whether or not a definition like
static char const letters[] = "";
defines two objects. I think it doesn't.
From what I can see,
that should create an array of char's of length
1, and the single element should be a null character.
Quite identical
to:
static char const letters[1] = "";
and:
static char const letters[1] = {'\0'};
I messed up my editing there. That shuda read:
From what I can see, that should create an array of char's of length
1, and the single element should be a null character. Quite identical
to:
static char const letters[1] = "";
and:
static char const letters[1] = {'\0'};
My compiler disagrees with me about the total equivelence of
const char UC[] = {
' ','A','B','C','D','E','F','G','H','I','J','K','L','M',
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z','\0'
};
and
const char UC[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ";
57: const char UC[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ";
0040118A mov ecx,7
0040118F mov esi,offset ___xt_z(0x00411a6c)+148h
00401194 lea edi,dword ptr [UC]
00401197 rep movs dword ptr es:[edi],dword ptr [esi]
39: const char UC[] = {
40: ' ','A','B','C','D','E','F','G','H','I','J','K','L','M',
004010D5 mov byte ptr [UC],20h
004010D9 mov byte ptr [ebp-23h],41h
004010DD mov byte ptr [ebp-22h],42h
004010E1 mov byte ptr [ebp-21h],43h
004010E5 mov byte ptr [ebp-20h],44h
004010E9 mov byte ptr [ebp-1Fh],45h
004010ED mov byte ptr [ebp-1Eh],46h
004010F1 mov byte ptr [ebp-1Dh],47h
004010F5 mov byte ptr [ebp-1Ch],48h
004010F9 mov byte ptr [ebp-1Bh],49h
004010FD mov byte ptr [ebp-1Ah],4Ah
00401101 mov byte ptr [ebp-19h],4Bh
00401105 mov byte ptr [ebp-18h],4Ch
00401109 mov byte ptr [ebp-17h],4Dh
41:
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z','\0'
0040110D mov byte ptr [ebp-16h],4Eh
00401111 mov byte ptr [ebp-15h],4Fh
00401115 mov byte ptr [ebp-14h],50h
00401119 mov byte ptr [ebp-13h],51h
0040111D mov byte ptr [ebp-12h],52h
00401121 mov byte ptr [ebp-11h],53h
00401125 mov byte ptr [ebp-10h],54h
00401129 mov byte ptr [ebp-0Fh],55h
0040112D mov byte ptr [ebp-0Eh],56h
00401131 mov byte ptr [ebp-0Dh],57h
00401135 mov byte ptr [ebp-0Ch],58h
00401139 mov byte ptr [ebp-0Bh],59h
0040113D mov byte ptr [ebp-0Ah],5Ah
42: };
00401141 mov byte ptr [ebp-9],0