المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : pointer casting



C++ Programming
04-09-2009, 02:02 PM
I am trying to cast an int pointer to double pointer, but conversion doesn´t work. I´ve tried c style casting and reinterpret_cast without success. Can anyone help me, please? For instance, how can I make ths work fine:

int a[]={1,2,3,4};
int* b;
double* c;

b=a;
c=(double*)b;

Thanks