[Tutor] printing columns

alan.gauld@bt.com alan.gauld@bt.com
Fri, 26 Jul 2002 16:53:56 +0100


> Using the two tabs does create two columns after a fashion, 
> they're just not evenly laid out. 

OK, so use the format string trick...

> As far as using #define instead of const, these are 
> preprocessor directives in a header file for a 
> Windows GUI in a class dedicated simultaneously to
> the Win32 API and to more advanced OOP concepts in C++ 

I guessed they were Windows message IDs or somesuch.
But the use of an enum is stiill preferable sonce the 
enum items translate directly to the same ints you 
have in the #define.

For the Win API stuff they are treaded as ints, for 
the C++ stuff they are typechecked...


> The instructor wants to see it coded this way. 

Ah well, we can't do much about the instructors ;-)

> ... but the header file consists of
> nothing but this list of #define statements. 
> This is then included in a .rc resource file.

That might make a difference, I can't remember how
resource file compilers work but they may well use the 
same syntax as the preprocessor #define in which 
case you do need to use it. Bummer!

Alan g.