I’m getting this error:
Expected '(' for function-style cast or type construction
On the second line:
struct OpenALInterface * CreateOpenALInterface(int numLoadedSounds, int numPlayingSounds){
return new IOS_OpenAL(int numLoadedSounds, int numPlayingSounds); //ERROR ABOVE
// return new IOS_OpenAL(); //this works fine, no error
};
Class has this:
class IOS_OpenAL: public OpenALInterface{
public:
IOS_OpenAL(int numLoadedSounds, int numPlayingSounds){
//do stuff
};
// IOS_OpenAL(){}; //works
What exactly is this error referring to? It looks like a syntax error.
The base class is abstract with no constructors. Is that the issue? Can a subclass override or have its own constructor not in the base class?
should be
The error happens because the compiler sees those “int” tokens and thinks you’re trying to cast something to an int, but you’re not.