Click here to Skip to main content
15,915,019 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dependency Walker lists a DLL as missing. However, program works without Error. Why? Pin
Prakash Nadar12-Apr-04 4:01
Prakash Nadar12-Apr-04 4:01 
AnswerRe: Dependency Walker lists a DLL as missing. However, program works without Error. Why? Pin
Tim Smith12-Apr-04 6:26
Tim Smith12-Apr-04 6:26 
GeneralNewbie GDI question Pin
Indrawati12-Apr-04 2:21
Indrawati12-Apr-04 2:21 
GeneralRe: Newbie GDI question Pin
David Crow12-Apr-04 3:53
David Crow12-Apr-04 3:53 
GeneralFile reading Pin
perozbabu12-Apr-04 2:10
perozbabu12-Apr-04 2:10 
GeneralRe: File reading Pin
David Crow12-Apr-04 3:58
David Crow12-Apr-04 3:58 
GeneralForm Width/Height & Pointer problem Pin
uus9912-Apr-04 2:02
uus9912-Apr-04 2:02 
GeneralCompiler Error Pin
Kash12-Apr-04 1:58
Kash12-Apr-04 1:58 
Hi,

I have a bit of code that works fine in non MFC C++ project. However when converting to MFC code I get the infamous C2664 compiler error. This is what I'm trying to do:

<br />
double CWork::Equation(double x[])<br />
{<br />
	return (100*(x[1]-x[0]*x[0])*(x[1]-x[0]*x[0])+(1.0-x[0])*(1.0-x[0]));<br />
}<br />
<br />
double CWork::DriverFunc(double (*dblfunc)(double[]), double start[])<br />
{	<br />
	min = lots of operations;<br />
	return min;<br />
}<br />
<br />
void CWork::WorkIt()<br />
{<br />
	double start[] = {1.,2.,3.};<br />
	double min;<br />
	int i;<br />
<br />
	min=DriverFunc(Equation,start);<br />
}<br />


This is the error: Work.cpp(1041) : error C2664: 'DriverFunc' : cannot convert parameter 1 from 'double (double []) const' to 'double (__cdecl *)(double [])'

Any suggestions would be great.

Kash
GeneralRe: Compiler Error Pin
Nitzan Shaked12-Apr-04 2:47
Nitzan Shaked12-Apr-04 2:47 
GeneralRe: Compiler Error Pin
Kash12-Apr-04 3:24
Kash12-Apr-04 3:24 
GeneralRe: Compiler Error Pin
Nitzan Shaked12-Apr-04 7:05
Nitzan Shaked12-Apr-04 7:05 
GeneralRe: Compiler Error Pin
Kash13-Apr-04 23:05
Kash13-Apr-04 23:05 
GeneralSplitters! Message Box Pin
ZoomBoy2712-Apr-04 1:49
ZoomBoy2712-Apr-04 1:49 
GeneralRe: Splitters! Message Box Pin
ZoomBoy2712-Apr-04 2:00
ZoomBoy2712-Apr-04 2:00 
QuestionHard Drive, BIOS and CPU serial number in VC++ 6.0? Pin
Freddie Code12-Apr-04 1:15
Freddie Code12-Apr-04 1:15 
AnswerRe: Hard Drive, BIOS and CPU serial number in VC++ 6.0? Pin
Milton Karimbekallil12-Apr-04 1:57
Milton Karimbekallil12-Apr-04 1:57 
AnswerRe: Hard Drive, BIOS and CPU serial number in VC++ 6.0? Pin
David Crow12-Apr-04 4:12
David Crow12-Apr-04 4:12 
AnswerRe: Hard Drive, BIOS and CPU serial number in VC++ 6.0? Pin
Darshan Jani12-Apr-04 7:47
Darshan Jani12-Apr-04 7:47 
GeneralTrouble with _variant_t Pin
yanuart12-Apr-04 1:08
yanuart12-Apr-04 1:08 
GeneralRe: Trouble with _variant_t Pin
Milton Karimbekallil12-Apr-04 1:48
Milton Karimbekallil12-Apr-04 1:48 
QuestionAre there somewhere good articles about MTS ? Pin
vgrigor12-Apr-04 0:53
vgrigor12-Apr-04 0:53 
Generalunsigned chars Pin
packetlos12-Apr-04 0:10
packetlos12-Apr-04 0:10 
GeneralRe: unsigned chars Pin
John R. Shaw12-Apr-04 0:37
John R. Shaw12-Apr-04 0:37 
GeneralRe: unsigned chars Pin
packetlos12-Apr-04 1:21
packetlos12-Apr-04 1:21 
GeneralRe: unsigned chars Pin
packetlos12-Apr-04 5:38
packetlos12-Apr-04 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.