Answer the question
In order to leave comments, you need to log in
Why can't I modify a statement in my DLL?
According to Ian Mellington's book, I'm trying to modify the operator, adding to it the ability to multiply my coordinate structures. However, when I try to do this in a DLL, I get an error E0345(Too few parameters for this operator function).
Here's what my operator declaration looks like in the DLL:
extern "C" GRAPHICLIBRARY_API void operator*= (const Vector2 value);
void operator*= (const Vector2 value);
Answer the question
In order to leave comments, you need to log in
I get error E0345(Too few parameters for this operator function).
extern "C" GRAPHICLIBRARY_API void operator*= (const Vector2 value);
*=
multiplies something by something. And in this prototype it has only one parameter. So the compiler is correct. See _And here's how in my project in the header:
void operator*= (const Vector2 value);
extern "C" GRAPHICLIBRARY_API void operator*= (Vector2& left, const Vector2 right);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question