double to int impossible

Started by
16 comments, last by Thaligar 16 years, 1 month ago
Quote:Original post by TheTroll
&dV is just an int that is the address of dV.


I don't mean to be pedantic, but that's not the case on most 64-bit platforms. I'm sure you know this and that you're just being general here, but I just want to prevent any noobies from getting too comfortable with things that can and will change in the (near) future. Otherwise they rely on them...and you know the rest.
Advertisement
doh, sorry,

no, it was meant this way

double * pD = &dV;


even after recompilation the code doesn't work, i have to investigate the caller function,

greets
tgar
doh, sorry,

no, it was meant this way (i typed it again, no copy & paste)

double * pD = &dV;


even after recompilation the code doesn't work, i have to investigate the caller function,

greets
tgar
very nice,

i tried this code snippet all in my code, even after the call to WinMain and it fails, the rest of the code is working as expected, i will try to compile it on a second machine and check if i can reproduce it.

greets,
tgar
First off, it's pretty much useless to type out code when you're asking for help. Always copy and paste.

Secondly, a minimal, but complete, code sample that demonstrates your problem has three characteristics. 1) It should contain everything necessary to reproduce your problem. 2) You can't remove anything from the code sample and still have it demonstrate your problem. 3) It should actually demonstrate your problem.

A code sample that fails to compile will fail all three points unless you're asking about a compiler error.

If you can't think of a way to generate such a code sample from scratch, one approach is to make a copy of your project and start deleting things until the code no longer shows the problem.
Quote:Original post by SiCrane
Always copy and paste.

Quoted, bolded, painted red and enlarged for emphasis, since apparently I didn't make my point well enough myself.
I don't think that was big enough.

Quote:Original post by SiCrane
Always copy and paste.


That should do it :)
thanks to all of you,

(this with the copy'n'paste i will remember the next time)

nevertheless, i found the "bug", and SiCrane it is not MY code which is buggy ;)

i compiled the same code on another machine without ANY bugs. the error was that there is a small problem in using

vista -> virtualpc -> winxp sp2 and vs2003

somewhere between these programs there is an error, a really heavy bug.

maybe it's only occuring once in a century, but i got it.

nevertheless, i can program again and my code acts like expected without any foreign bugs,

greets to all,
thanks again
tgar

This topic is closed to new replies.

Advertisement