<<< | Index | >>> |
void main() { double d = 3.5; const double CD = 4.5; double* ptr; // pointer to double double const* ptr2cd; // pointer to const double ptr = &d; // OK ptr = &CD; // Error: address of const can't be assigned to non-const pointer ptr2cd = &d; // OK ptr2cd = &CD; // OK }
<<< | Index | >>> |