I'm trying to define an array of structure type CHAR_INFO with 2000 elements,
and a union in the same time of an array of 8000 characters.
CHAR_INFO has already a union inside:
Code:
typedef struct _CHAR_INFO { // chi
union { /* Unicode or ANSI character */
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes; // text and background colors
} CHAR_INFO, *PCHAR_INFO;
I am not able to figure how should I declare the structure with a union to
have the same area of 8000 bytes usable in both array mode and struct mode.
If I declare an array of structure type CHAR_INFO:
Code:
CHAR_INFO area_to_write[2000];
Where do I put the union to use the same area for an array of 8000 characters?
Thanks for any help you can give me.