Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ void pointer

void *ptr;    // ptr is declared as Void pointer

char c;
int i;
float f;

ptr = &c;  // ptr has address of character data
ptr = &i;  // ptr has address of integer data
ptr = &f;  // ptr has address of float data
Source by www.atnyla.com #
 
PREVIOUS NEXT
Tagged: #void #pointer
ADD COMMENT
Topic
Name
9+4 =