Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old 01-25-2008, 01:09 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,654
Last Blog:
CherryPy(thon)
Rep Power: 29
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

Endianness is about how the data is stored in the memory. When you're talking about endianness, you're usually talking about big endian, little endian, and some times mixed endian. There's much more information on Wikipedia.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 01-25-2008, 09:27 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

UPDATE: FREAD AND FWRITE DO NOT COMPENSATE FOR BIG/LITTLE ENDIAN MODE.

And yes, it would affect the data. 0xABCD is not the same as 0xDCBA. I think (but I'm not sure) that fread() and fwrite() take care of that. If you need to use specific data sizes that are cross-platform, instead of using BYTE,WORD,DWORD, and QWORD, use __int8, __int16, __int32, and __int64 (use unsigned prefix if necessary). These are guaranteed to be the same size on any system, indicated by the number after int which is the number of bits.

Last edited by dargueta; 01-27-2008 at 12:59 PM. Reason: Fixed an error
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 01-27-2008, 12:56 PM
monkey_instinct's Avatar   
monkey_instinct monkey_instinct is offline
Learning Programmer
 
Join Date: Dec 2007
Posts: 88
Rep Power: 4
monkey_instinct will become famous soon enough
Default

dargueta, you have the facility to test the bitmaps on different architectures. I think the best way to know if bitmaps depend on the underlined architecture is to test it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 01-27-2008, 12:58 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

I don't quite get what you mean.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 01-27-2008, 01:03 PM
monkey_instinct's Avatar   
monkey_instinct monkey_instinct is offline
Learning Programmer
 
Join Date: Dec 2007
Posts: 88
Rep Power: 4
monkey_instinct will become famous soon enough
Default

Quote:
Originally Posted by PAUL1966 View Post
So if you have two computers with different architecture (one that defines a UINT as 16 bits, and the other that defines a UINT as 32 bits) and creates a bitmap file on one computer. Then it will be corrupt if you try to read it on the other computer, would it not?
You haven't done this? I mean, create the bitmap on a 16- or 32-bit architecture and try to read it on a different 64-bit architecture.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #16 (permalink)  
Old 01-27-2008, 06:44 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

Um...no. Should I have? As long as one uses the right data type declarations, architecture shouldn't matter.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ionFiles Popular Files Module Jordan ionFiles 4 11-27-2008 09:43 AM
Alter many files, all with same variable in them woocha PHP Forum 3 01-17-2008 07:06 PM
How do I read .mbm (Multi BitMap) files? moondog General Programming 7 08-07-2007 08:08 AM
Java Help Files xXHalfSliceXx Java Help 3 11-29-2006 12:30 AM


All times are GMT -5. The time now is 10:46 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 101%


Complete - Celebrate!

Ads