http://www.mvps.org/windev/cpp/class.html problem 
Author Message
 http://www.mvps.org/windev/cpp/class.html problem

i'm doing what i've done many times before..
which is explained on the page in the subject

http://www.*-*-*.com/

but now, it doesnt work. i get casting warnings,
and when i run, i'm not recieving the correct pointer.

is this a new problem that came about with .net??

my cast warning is this:

c:\Aaron\Projects\crender\crender\crender.cpp(79) : warning C4312: 'type cast' : conversion from 'LONG' to 'crender *'
of greater size

tia,
aaron



Sun, 07 Nov 2004 14:18:56 GMT  
 http://www.mvps.org/windev/cpp/class.html problem

Quote:
>my cast warning is this:

>c:\Aaron\Projects\crender\crender\crender.cpp(79) : warning C4312: 'type cast' : conversion from 'LONG' to 'crender *'
>of greater size

aaron,

I suspect this will be because you have the /Wp64 option in the
compiler settings. It shouldn't be the cause of a problem for a 32-bit
program though.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sun, 07 Nov 2004 17:22:57 GMT  
 http://www.mvps.org/windev/cpp/class.html problem
Aaron,

Quote:
> i'm doing what i've done many times before..
> which is explained on the page in the subject

> http://www.mvps.org/windev/cpp/class.html

> but now, it doesnt work. i get casting warnings,
> and when i run, i'm not recieving the correct pointer.

> is this a new problem that came about with .net??

> my cast warning is this:

> c:\Aaron\Projects\crender\crender\crender.cpp(79) : warning C4312: 'type

cast' : conversion from 'LONG' to 'crender *'

Quote:
> of greater size

Dave is right on the money on his suggestion. I'd like to add that you have
to ways of getting rid of the warning:

1- Disable /Wp64
2- Change your code to make it Win64 friendly (a preferable alternative,
imho), by not using LONG to store pointers, and using one of the typedefs
designed for this task in the Windows headers, such as ULONG_PTR.

--
Tomas Restrepo



Mon, 08 Nov 2004 01:43:44 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. http://www.ioccc.org/

2. Programming languages vote - results on http://www.iprolink.ch/~lambercy

 

 
Powered by phpBB® Forum Software