Cast void* to the correct type - C++ Data Type

C++ examples for Data Type:Pointer

Description

Cast void* to the correct type

Demo Code

int main() {/*from  w  w  w  .  java2  s  .c o  m*/
   int i = 99;
   void* vp = &i;
   *((int*)vp) = 3;
}

Related Tutorials