c++ - reinterpret_cast< > from one structure to another -


i'm going through win32 program , found part of code contained reinterpret_cast<> 1 structure another. happens

pkt_header* ppktheader = reinterpret_cast<pkt_header*>( buffer ); 

ppktheader , buffer 2 structure pointers.

my question happening here?

there big misunderstanding on side. reinterpret_cast of pointer 1 structure, pointer structure. effect same c-style casts. block of memory pointed buffer going reinterpreted pkt_header structure.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -