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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|