Click here to Skip to main content
16,011,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalerror Incorrect Function Pin
andyg.1016-Jul-03 1:36
andyg.1016-Jul-03 1:36 
GeneralRe: error Incorrect Function Pin
andyg.1016-Jul-03 1:44
andyg.1016-Jul-03 1:44 
Questionhow to control networkcard in c/c++! Pin
jobillcai6-Jul-03 0:21
jobillcai6-Jul-03 0:21 
Generalerror Pin
dudic5-Jul-03 23:39
dudic5-Jul-03 23:39 
GeneralRe: error Pin
Ryan Binns5-Jul-03 23:55
Ryan Binns5-Jul-03 23:55 
GeneralRe: error Pin
Michael Dunn6-Jul-03 2:59
sitebuilderMichael Dunn6-Jul-03 2:59 
GeneralQuestion about #pragma pack(1) Pin
George25-Jul-03 21:46
George25-Jul-03 21:46 
GeneralRe: Question about #pragma pack(1) Pin
Rick York5-Jul-03 22:03
mveRick York5-Jul-03 22:03 
Typically the compiler will align members of data structures to their elemental word size. For an integer this means on a four-byte boundary. For shorts it is two, doubles are eight, and bytes are unaligned - they will immediately follow their predecessor.

Sometimes, alignment issues can not be tolerated. Examples are communication interfaces and binary data storage. You must often precisely define where every byte of data is located in these types of applications. #pragma pack(1) means align on a 1 byte boundary or in effect, allow the data to be unaligned.


The Ten Commandments For C Programmers
GeneralRe: Question about #pragma pack(1) Pin
George25-Jul-03 22:12
George25-Jul-03 22:12 
GeneralRe: Question about #pragma pack(1) Pin
peterchen5-Jul-03 22:18
peterchen5-Jul-03 22:18 
GeneralRe: Question about #pragma pack(1) Pin
peterchen5-Jul-03 22:16
peterchen5-Jul-03 22:16 
GeneralRe: Question about #pragma pack(1) Pin
George26-Jul-03 17:10
George26-Jul-03 17:10 
GeneralRe: Question about #pragma pack(1) Pin
peterchen6-Jul-03 21:36
peterchen6-Jul-03 21:36 
GeneralRe: Question about #pragma pack(1) Pin
George26-Jul-03 21:57
George26-Jul-03 21:57 
GeneralRe: Question about #pragma pack(1) Pin
peterchen6-Jul-03 22:26
peterchen6-Jul-03 22:26 
GeneralRe: Question about #pragma pack(1) Pin
George26-Jul-03 22:51
George26-Jul-03 22:51 
GeneralRe: Question about #pragma pack(1) Pin
peterchen7-Jul-03 1:15
peterchen7-Jul-03 1:15 
GeneralHexadecimal representation Pin
punkms15-Jul-03 20:46
punkms15-Jul-03 20:46 
GeneralRe: Hexadecimal representation Pin
Rick York5-Jul-03 21:31
mveRick York5-Jul-03 21:31 
GeneralRe: Hexadecimal representation Pin
Ryan Binns5-Jul-03 22:05
Ryan Binns5-Jul-03 22:05 
GeneralRe: Hexadecimal representation Pin
peterchen5-Jul-03 22:21
peterchen5-Jul-03 22:21 
GeneralRe: Hexadecimal representation Pin
Ryan Binns5-Jul-03 22:31
Ryan Binns5-Jul-03 22:31 
GeneralRe: Hexadecimal representation Pin
peterchen6-Jul-03 21:41
peterchen6-Jul-03 21:41 
GeneralRe: Hexadecimal representation Pin
Ryan Binns6-Jul-03 22:27
Ryan Binns6-Jul-03 22:27 
GeneralRe: Hexadecimal representation Pin
Rick York5-Jul-03 22:32
mveRick York5-Jul-03 22:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.