Pointer Conversions

From RAD Studio
Jump to: navigation, search

Go Up to Pointers Index

Pointer types can be converted to other pointer types using the typecasting mechanism:

char *str;
int *ip;
str = (char *)ip;

More generally, the cast (type*) will convert a pointer to type "pointer to type."

See C++ specific for a discussion of C++ typecast mechanisms.