Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HELP: I don't know why my pointer changing shapes not consistant? Pin
THAQCD4-Aug-09 3:27
THAQCD4-Aug-09 3:27 
GeneralRe: HELP: I don't know why my pointer changing shapes not consistant? Pin
«_Superman_»4-Aug-09 18:15
professional«_Superman_»4-Aug-09 18:15 
GeneralRe: HELP: I don't know why my pointer changing shapes not consistant? Pin
THAQCD5-Aug-09 4:31
THAQCD5-Aug-09 4:31 
QuestionCHtmlView and IE version Pin
BadJerry3-Aug-09 7:15
BadJerry3-Aug-09 7:15 
AnswerRe: CHtmlView and IE version Pin
Bacon Ultimate Cheeseburger3-Aug-09 11:46
Bacon Ultimate Cheeseburger3-Aug-09 11:46 
QuestionByte Swapping Big End to Little End Pin
Grahamfff3-Aug-09 6:42
Grahamfff3-Aug-09 6:42 
AnswerRe: Byte Swapping Big End to Little End Pin
Chris Losinger3-Aug-09 9:20
professionalChris Losinger3-Aug-09 9:20 
AnswerRe: Byte Swapping Big End to Little End Pin
Luc Pattyn3-Aug-09 9:35
sitebuilderLuc Pattyn3-Aug-09 9:35 
As Chris said, you do need type-specific code.

In particular you need byte swapping only when multi-byte data is involved, so a 4-byte int needs its 4 bytes swapped; an 8-byte double needs its 8 bytes swapped; and a 4-byte byte array is fine the way it is.

Just make a drawing of what the data looks like on a big-endian machine, and then again on a little-endian machine, and you'll never forget what is involved.

BTW: float values could use different encodings altogether; nowadays most systems use an IEEE format, however I have seen some other schemes over the years. When different, it becomes really hard to get them across, and you might want to consider a different representation, maybe even a string!

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

AnswerRe: Byte Swapping Big End to Little End Pin
«_Superman_»3-Aug-09 18:59
professional«_Superman_»3-Aug-09 18:59 
GeneralRe: Byte Swapping Big End to Little End Pin
Grahamfff4-Aug-09 3:02
Grahamfff4-Aug-09 3:02 
QuestionFacing problem while file reading Pin
bhanu_reddy093-Aug-09 6:25
bhanu_reddy093-Aug-09 6:25 
QuestionRe: Facing problem while file reading Pin
Rajesh R Subramanian3-Aug-09 6:56
professionalRajesh R Subramanian3-Aug-09 6:56 
AnswerRe: Facing problem while file reading Pin
bhanu_reddy093-Aug-09 18:15
bhanu_reddy093-Aug-09 18:15 
GeneralRe: Facing problem while file reading Pin
Rajesh R Subramanian3-Aug-09 20:56
professionalRajesh R Subramanian3-Aug-09 20:56 
QuestionIs it a GDI+ flaw? or I am missing something? Pin
transoft3-Aug-09 6:17
transoft3-Aug-09 6:17 
AnswerRe: Is it a GDI+ flaw? or I am missing something? Pin
Michael Dunn3-Aug-09 9:41
sitebuilderMichael Dunn3-Aug-09 9:41 
GeneralRe: Is it a GDI+ flaw? or I am missing something? [modified] Pin
transoft3-Aug-09 10:13
transoft3-Aug-09 10:13 
GeneralRe: Is it a GDI+ flaw? or I am missing something? Pin
Michael Dunn3-Aug-09 11:50
sitebuilderMichael Dunn3-Aug-09 11:50 
GeneralRe: Is it a GDI+ flaw? or I am missing something? Pin
transoft3-Aug-09 13:01
transoft3-Aug-09 13:01 
GeneralRe: Is it a GDI+ flaw? or I am missing something? Pin
transoft10-Aug-09 5:29
transoft10-Aug-09 5:29 
GeneralRe: Is it a GDI+ flaw? or I am missing something? Pin
Michael Dunn10-Aug-09 13:50
sitebuilderMichael Dunn10-Aug-09 13:50 
QuestionFirst Time Visual C++ User - Compiler Problems Pin
BSO_VC3-Aug-09 5:28
BSO_VC3-Aug-09 5:28 
QuestionRe: First Time Visual C++ User - Compiler Problems Pin
David Crow3-Aug-09 5:43
David Crow3-Aug-09 5:43 
AnswerRe: First Time Visual C++ User - Compiler Problems Pin
BSO_VC3-Aug-09 6:42
BSO_VC3-Aug-09 6:42 
QuestionRe: First Time Visual C++ User - Compiler Problems Pin
David Crow3-Aug-09 7:12
David Crow3-Aug-09 7:12 

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.