Reputation: 2112
I am not very familiar with C++ and here I am confronted with an error which I couldn't find answer from web.
I am trying to compile an example code which imports functions from a dll.
I am using VS 2010 Professional.
The problem is I get an error message saying:
error C2660: 'CDialog::Initialize': function does not take 4 arguments.
When I look at the 'Initilize()' function, I see that actually it is not a CDialog:: function but something completely different function from the dll, where the header file is include in the .cpp. It's the compiler misunderstanding it to CDialog:: and I see that since the class of the function in which the Initialize() is being called is actually inherited from CDialog.
What would be the simplest fix for this problem ?
Thanks in advance
Upvotes: 1
Views: 147
Reputation: 72271
Specify the correct function to be called with Namespace::Initialize()
or Class::Initialize()
, or just ::Initialize()
if the function is not a member of any namespace or class.
Upvotes: 3