Blue wrote:
> Jeff Schwab wrote:
>
> >Why are you casting?
>
> Take a look at the code. I'm abstracting strings.
>
> I do it so I can construct strings of any datatype.
>
> I have TCHAR String = TEXT("Hello World\n") so the code is written and
> I can choose at compile time if I want the application to use ASCII by
> default or unicode. I can also decide if I want string literals to be
> const by default. Simple abstraction. I use to use defines but then
> I decovered how wonderful typedef can be. If this just isn't possible
> anymore I'll have to go back to full macro data types.
But why are you casting?
Always try to remove typecasts. The better your design, the less likely they
are needed. Only use them in a pinch.
--
Phlip
http://www.xpsd.org/cgi-bin/wiki?Tes...UserInterfaces