RAD Studio
ContentsIndex
PreviousUpNext
Pointer Conversions

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.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!