What you want to code is:
VOID main() {
BPTR outp;
outp = Open("Con:0/0/200/100/TEST", MODE_NEWFILE);
Write(outp, "This is a test\n", 15);
Close(outp);
}
You want to treat the BPTR as just that – an unknown type of pointer that you
don't need to manipulate. Only in a few rare circumstances will you actually
need to do a conversion from a BPTR to a real pointer. One way to make life
easier for you is to use the prototypes and let the compiler complain when you
pass the wrong parameters. If you find you have to put a cast on everything
to make the compiler quiet, then you probably want to declare the item different
(as in this case).
As for BPTR's going away, sorry. It appears that they are here to stay.
Actually they aren't too bad if you just treat them as unknown objects.
.