Re: endianness and sscanf/sprintf
From: Richard Heathfield (invalid_at_address.co.uk.invalid)
Date: 01/01/04
- Next message: Martijn Lievaart: "Re: classes wrting/reading to binary file"
- Previous message: Alexander Stippler: "reverse iterators revisited"
- In reply to: EventHelix.com: "Re: endianness and sscanf/sprintf"
- Next in thread: EventHelix.com: "Re: endianness and sscanf/sprintf"
- Reply: EventHelix.com: "Re: endianness and sscanf/sprintf"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 01 Jan 2004 14:30:27 +0000
EventHelix.com wrote:
> You will be fine as everything is being converted to characters.
> As long as characters are represented as 8 bytes, the numbers
> will be interpreted correctly.
In C (and, as far as I am aware, C++ too), characters are always represented
in a single byte. Character /constants/ are represented (in C, but not C++)
by the int type, which might conceivably be eight bytes. Is that what you
meant?
(Followups set to comp.lang.c)
-- Richard Heathfield : binary@eton.powernet.co.uk "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999. C FAQ: http://www.eskimo.com/~scs/C-faq/top.html K&R answers, C books, etc: http://users.powernet.co.uk/eton
- Next message: Martijn Lievaart: "Re: classes wrting/reading to binary file"
- Previous message: Alexander Stippler: "reverse iterators revisited"
- In reply to: EventHelix.com: "Re: endianness and sscanf/sprintf"
- Next in thread: EventHelix.com: "Re: endianness and sscanf/sprintf"
- Reply: EventHelix.com: "Re: endianness and sscanf/sprintf"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|