Re: [Dev-C++] No matching Function Error
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Elizabeth B. <sog...@ya...> - 2002-08-30 05:40:23
|
> > Hello, > > I'm working my way through C++ in Action. And I'm stuck with the error > > message: > > > > C:\Projects\Winnie\Class.cpp > > In method `void Win::ClassMaker::SetIcons(int)': > > 23 C:\Projects\Winnie\Class.cpp > > no matching function for call to `StdIcon::Load (void *&, int &)' > > 43 C:\Projects\Winnie\Icon.h > > candidates are: void StdIcon::Load(HINSTANCE__ *, int) > > > > I have gone through the files Icon.h, Icon.cpp and the functions are all > > there. Icon.h has also been included in Class.cpp. What could be wrong. > > For > > the record I have all the project files in one directory. I have linker > > errors when I split them into differnt directories. > > > > I'll appreciate your help please. It may not be a match. Try doing such things as casting your parameters to the ones in StdIcon::Load, e.g.: Load( (HINSTANCE) x, (int) y); // you probably won't need to cast the int I've worked through a number of the examples on Reliable Software's site (<http://www.relisoft.com/win32/>) - that and reinterpret_cast caused me the most difficulties. For reinterpret_cast, I just replaced it with a c-style cast (instead of "reinterpret_cast<int> y" I just did "(int) y").q By the way, how do you like that book? I really enjoy Bartosz' fine win32 examples from the link above, esp.the model-view-controller information. Elizabeth |