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

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -