Click here to Skip to main content
15,887,821 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Blinking cursor Pin
Iain Clarke, Warrior Programmer7-Sep-09 4:32
Iain Clarke, Warrior Programmer7-Sep-09 4:32 
GeneralRe: Blinking cursor Pin
susanne18-Sep-09 23:38
susanne18-Sep-09 23:38 
Questionbyte alignment issue? Writing struct to file in binary mode. [modified] Pin
Sauce!7-Sep-09 1:57
Sauce!7-Sep-09 1:57 
AnswerRe: byte alignment issue? Writing struct to file in binary mode. Pin
CPallini7-Sep-09 2:24
mveCPallini7-Sep-09 2:24 
AnswerRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 2:39
mveRichard MacCutchan7-Sep-09 2:39 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. [modified] Pin
Sauce!7-Sep-09 3:50
Sauce!7-Sep-09 3:50 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 4:57
mveRichard MacCutchan7-Sep-09 4:57 
AnswerRe: byte alignment issue? Writing struct to file in binary mode. Pin
Luc Pattyn7-Sep-09 2:39
sitebuilderLuc Pattyn7-Sep-09 2:39 
Hi,

if you can modify the struct any way you want, I suggest you reorder its content from largest to smallest item, that way no padding will be applied, hence no padding instructions will be necessary.

Like so:
unsigned int i1;
unsigned int i2;
unsigned short s1;
unsigned short s2;
char c[2];


If that is not possible, you must make sure all parties involved use the same padding rules.

Smile | :)

Luc Pattyn
Badger | [badger,badger,badger,badger...] Jig | [Dance] Badger | [badger,badger,badger,badger...] Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.Jig | [Dance] Badger | [badger,badger,badger,badger...] Jig | [Dance]

modified on Monday, September 7, 2009 12:10 PM

GeneralRe: byte alignment issue? Writing struct to file in binary mode. [modified] Pin
Sauce!7-Sep-09 6:04
Sauce!7-Sep-09 6:04 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Luc Pattyn7-Sep-09 6:16
sitebuilderLuc Pattyn7-Sep-09 6:16 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 10:59
mveRichard MacCutchan7-Sep-09 10:59 
QuestionStrings in EXE Pin
choramale_vs7-Sep-09 1:45
choramale_vs7-Sep-09 1:45 
AnswerRe: Strings in EXE Pin
Richard MacCutchan7-Sep-09 1:52
mveRichard MacCutchan7-Sep-09 1:52 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 2:26
choramale_vs7-Sep-09 2:26 
GeneralRe: Strings in EXE Pin
Richard MacCutchan7-Sep-09 2:30
mveRichard MacCutchan7-Sep-09 2:30 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 2:51
choramale_vs7-Sep-09 2:51 
GeneralRe: Strings in EXE Pin
Richard MacCutchan7-Sep-09 4:21
mveRichard MacCutchan7-Sep-09 4:21 
AnswerRe: Strings in EXE Pin
CPallini7-Sep-09 1:55
mveCPallini7-Sep-09 1:55 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 3:50
choramale_vs7-Sep-09 3:50 
GeneralRe: Strings in EXE Pin
Michael Schubert7-Sep-09 4:03
Michael Schubert7-Sep-09 4:03 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 4:14
choramale_vs7-Sep-09 4:14 
GeneralRe: Strings in EXE Pin
Michael Schubert7-Sep-09 4:37
Michael Schubert7-Sep-09 4:37 
GeneralRe: Strings in EXE Pin
Nick_1117-Sep-09 6:17
Nick_1117-Sep-09 6:17 
GeneralRe: Strings in EXE Pin
Michael Schubert7-Sep-09 6:54
Michael Schubert7-Sep-09 6:54 
QuestionMySQL connection Pin
rdop7-Sep-09 1:16
rdop7-Sep-09 1:16 

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.