>45 struct IntuiText *MyText;
this fills me with dread, surely that should be:
>45 struct IntuiText *MyText = new IntuiText;
but does that mean i have to "free" it when i shutdown?
Of course you must allocate some memory if you use a pointer. But "new" is not the right thing here. I guess the tutorial is about C, not C++. Use AllocMem/FreeMem instead. Or use struct IntuiText MyText instead of *MyText.
>54 PrintIText( MyWindow->RPort, MyText, 0, 0 );
changing it to this:
>54 PrintIText( MyWindow->RPort, MyText, MyWindow->BorderLeft, MyWindow->BorderTop );
offsets it into the window's window bit. i learnt that by reading intuition.h
Just add the GimmeZeroZero flag, then Intuition does that for you.
>104 CloseLibrary( (struct Library *)IntuitionBase );
This caused shell lockups and all sorts of memory trouble, it worked cleanly when i made it:
>104 CloseLibrary( IntuitionBase );
But the former is correct. You should include
, and to give the compiler the chance to inform you about wrong types.
cycloid - willing and able C++ coder who's struggling through lack of documentation!
Get the Amiga Developer CD. There is a lot of documentation on it and it is the *official* documentation. You really need it. Trial and error is not the right way to learn programming, because only documented features continue to work in future OS versions.
Bye,
Thomas