The error :
--------------------Configuration: problema 3 final - Win32 Debug--------------------
Compiling...
problema 3 final.cpp
C:\problema 3 final.cpp(12) : error C2440: '=' : cannot convert from 'double *' to 'long'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.
Interpret your error message and you will know what went wrong. It says in the file "problema 3 final.cpp" on line 12 there was an error converting from a double pointer (&value1) to a long value (*Iptr): *Iptr=&value1;
You cannot convert a pointer to a long value without a cast: *Iptr = (long) &value1;
or *Iptr = reinterpret_cast<long> (&value1);
should fix your problem.
Also, you should be using `int main()' instead of `void main()'.
THANKS YOU !
actually l dont know what cast is , l even don't know what conversion is .
and why should l do it .
all l wanted to store the memory address of the variable value1 into another value called obj
but l had to do so using a pointers , as far as l know " *Iptr"= obj .
so that should do it . isn't it right?
I think you complicated things a bit too much. Why aren't you using a double pointer rather than a long pointer (double * instead of long *)? That would eliminate the need for `obj' to exist at all.