Главная страница | назад





Article #20874: Why can't I use the streaming operators with the VCL classes Set, Variant, and Currency?

Question:

When I use operator << with a class derived from Set, such as TFontStyles, I get the compiler error "operator << not implemented in type < stream type > for arguments of type TFontStyle"

Why can't I use the streaming operators with the VCL classes Set, Variant, and Currency?

Answer:

You need to define a preprocessor directive enabling this functionality. Place the following line above the include directive for vcl.h:

#define VCL_IOSTREAM

Or you can add VCL_IOSTREAM to the project conditional defines under Project|Options|Directories/Conditionals

Last Modified: 13-MAR-02