In ILE C++, the enum size is always the size of an integer unless the
#pragma enum directive is used.
To resolve any problem with the enum type size, use the #pragma enum directive, as shown in the following figure:
Figure 229. Example of #pragma enum Directive that Resolves Data Type Size Issues
. . #pragma enum (2) enum { a=0xffff} A; //sizeof(A)=2; #pragma enum () . . |
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.