No if only it was that easy. This is my problem excactly. It works fine under c but when changing to c++ you get different error messages.
I tried this piece of code:
#include
struct intuitionBase *IntuitionBase;
IntuitionBase = (struct IntuitionBase*)OpenLibrary("intuition.library", 39);
if (IntuitionBase) CloseLibrary(IntuitionBase);
void main()
{
}
and I got
ANSI C++ forbids declaration `IntuitionBase' with no type
4: conflicting types for `int IntuitionBase'
3: previous declaration as `struct intuitionBase * IntuitionBase'
4: implicit declaration of function `int OpenLibrary(...)'
4: initialization to `int' from `IntuitionBase *' lacks a cast
6: parse error before `if'
:-?
Is there anyone who can tell me how to make this work