Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Casting (http://www.go4expert.com/forums/casting-t9502/)

boschow 21Mar2008 12:51

Casting
 
Hello,

I am programing in C and i have an array of chars a[20], and I have an int b. I am triing to copy the fourth element of the array a[3] into the int b. I wrote something like this:

Code:

a= (int*)&prcsData->appData[3];
But the rezult isn't what i was expecting. Can you please have a look and tell me what i am doing wrong ?

Best Regards,
BoSCHoW.


All times are GMT +5.5. The time now is 02:43.