Click here to Skip to main content
15,899,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWorker thread question Pin
RobJones20-May-02 8:23
RobJones20-May-02 8:23 
GeneralRe: Worker thread question Pin
Bill Wilson20-May-02 8:25
Bill Wilson20-May-02 8:25 
GeneralRe: Worker thread question Pin
Prem Kumar20-May-02 8:31
Prem Kumar20-May-02 8:31 
GeneralControl Colors Pin
Mike Doner20-May-02 8:08
Mike Doner20-May-02 8:08 
GeneralRe: Control Colors Pin
Shog920-May-02 13:38
sitebuilderShog920-May-02 13:38 
GeneralCan't get ios::binary mode to work Pin
JohnnyG20-May-02 7:36
JohnnyG20-May-02 7:36 
GeneralRe: Can't get ios::binary mode to work Pin
Joaquín M López Muñoz20-May-02 10:11
Joaquín M López Muñoz20-May-02 10:11 
GeneralRe: Can't get ios::binary mode to work Pin
JohnnyG20-May-02 11:09
JohnnyG20-May-02 11:09 
I keep running into the same ol' crap again. I'm converting some code that works in Borland C++ 5.01 to VC++ 6.0. Anyways, code that worked in Borland obviously doesn't in MSVC. You were right, it does work in binary. It turns out that the sizeof operator does not work the same between versions so I was off in reading contents of objects.

Previous programmer had statements like:

stream.Read(&site.peArray, sizeof(site.peArray));

where peArray was defined as:
#define MAX_PE_PER_SITE 4
TPerEcho peArray[MAX_PE_PER_SITE];

The object is 6 bytes long, a float + a short but it kept coming up with 8 bytes from the sizeof() operator (actually 32 instead of 24).
GeneralRe: Can't get ios::binary mode to work Pin
Chris Losinger20-May-02 11:18
professionalChris Losinger20-May-02 11:18 
GeneralRe: Can't get ios::binary mode to work Pin
Ernest Laurentin20-May-02 11:51
Ernest Laurentin20-May-02 11:51 
GeneralRe: Can't get ios::binary mode to work Pin
JohnnyG20-May-02 11:16
JohnnyG20-May-02 11:16 
GeneralHTML Dialog Pin
Sumudu Perera20-May-02 7:11
Sumudu Perera20-May-02 7:11 
GeneralRe: HTML Dialog Pin
Prem Kumar20-May-02 7:23
Prem Kumar20-May-02 7:23 
Generalusing dialog data Pin
RalfPeter20-May-02 7:08
RalfPeter20-May-02 7:08 
GeneralRe: using dialog data Pin
Prem Kumar20-May-02 7:17
Prem Kumar20-May-02 7:17 
GeneralRe: using dialog data Pin
Alvaro Mendez20-May-02 9:58
Alvaro Mendez20-May-02 9:58 
GeneralArray of objects with classwizard Pin
RuiSantiago20-May-02 6:47
RuiSantiago20-May-02 6:47 
GeneralRe: Array of objects with classwizard Pin
Nish Nishant20-May-02 7:06
sitebuilderNish Nishant20-May-02 7:06 
GeneralRe: Array of objects with classwizard Pin
Prem Kumar20-May-02 7:13
Prem Kumar20-May-02 7:13 
GeneralRe: Array of objects with classwizard Pin
RuiSantiago20-May-02 8:24
RuiSantiago20-May-02 8:24 
GeneralRe: Array of objects with classwizard Pin
RuiSantiago20-May-02 9:00
RuiSantiago20-May-02 9:00 
GeneralOption or Radio Buttons Pin
Ruca20-May-02 6:46
Ruca20-May-02 6:46 
GeneralRe: Option or Radio Buttons Pin
Joaquín M López Muñoz20-May-02 6:50
Joaquín M López Muñoz20-May-02 6:50 
GeneralRe: Option or Radio Buttons Pin
Ruca20-May-02 8:01
Ruca20-May-02 8:01 
GeneralRe: Option or Radio Buttons Pin
Joaquín M López Muñoz20-May-02 9:46
Joaquín M López Muñoz20-May-02 9:46 

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.