Is it possible to use a typedefed variable with library classes?

In particular, what I've done is:

typedef  int  TestType;
TestType  t;
File      f;

t = 42;
f.write (t);

And the response I get is the compiler asking whether I want to write bytes or a long.

Am I doing something grossly wrong? Or is typedef just broken? Or is it really supposed to work that way for some not-understood reason? (alias works fine...but this seems to make typedef basically useless. Unless there's a way of adding functions to the library classes [like file] so that they'll understand how to cast the typedefed variable.)

Reply via email to