|
version 1.1, 2001/07/24 15:15:41
|
version 1.2, 2001/12/13 14:53:21
|
|
|
|
| Do not use this macro in .cpp files. Instead put the following | Do not use this macro in .cpp files. Instead put the following |
| at the beginning of the file: | at the beginning of the file: |
| | |
| PEGASUS_USING_STD |
PEGASUS_USING_STD; |
| | |
| 2. The following does not compile with some compilers. | 2. The following does not compile with some compilers. |
| | |
|
|
|
| static const Uint32 COLOR; | static const Uint32 COLOR; |
| }; | }; |
| | |
| Change to this: |
|
| |
|
| class X |
|
| { |
|
| public: |
|
| |
|
| static const Uint32 COLOR; |
|
| }; |
|
| |
|
| And place this in the .cpp file: | And place this in the .cpp file: |
| | |
| const Uint32 X::COLOR = 255; | const Uint32 X::COLOR = 255; |
| | |
| Or use enumerated type: |
Or use enumerated types: |
| | |
| class X | class X |
| { | { |
|
|
|
| enum { COLOR = 225 }; | enum { COLOR = 225 }; |
| }; | }; |
| | |
| |
3. Explain use of Linkage.h files and linkage directives. |