Re: [Dev-C++] conversion from void *
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Hongli L. <h....@ch...> - 2002-07-05 20:16:55
|
On Fri, 2002-07-05 at 21:11, Carlos Garc=EDa del Monte wrote: > Hi: > I am learning windows programing, and in great proportion of the > examples I try to compile I get the error "ANSI C++ forbids implicit > conversion from `void *' in argument passing", many times due to the 0 > value passed in functions like CreateWindowEx, in the last parameter, > what can I do for Mingw accept it? Some times I change 0 by NULL, but it > does not work always, in such cases, what can I do? >=20 > Thank you >=20 That parameter expects a pointer. 0 is an integer. Since C++ is strict, you'll have to tell explicitly that 0 must be treated as a memory location (pointer). Something like this: CreateWindowEx (foo, bar, (void *) 0); |