Click here to Skip to main content
15,895,859 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Check if mouse button is pressed? Pin
Joe Woodbury29-Apr-04 11:09
professionalJoe Woodbury29-Apr-04 11:09 
GeneralRe: Check if mouse button is pressed? Pin
Maarten Kools29-Apr-04 11:31
professionalMaarten Kools29-Apr-04 11:31 
GeneralRe: Check if mouse button is pressed? Pin
Joe Woodbury29-Apr-04 15:10
professionalJoe Woodbury29-Apr-04 15:10 
GeneralActiveX Pin
Demian Panello29-Apr-04 8:43
Demian Panello29-Apr-04 8:43 
GeneralRe: ActiveX Pin
David Crow29-Apr-04 9:47
David Crow29-Apr-04 9:47 
GeneralPulling Integers from a Binary file.... Pin
mike-o29-Apr-04 8:12
mike-o29-Apr-04 8:12 
GeneralRe: Pulling Integers from a Binary file.... Pin
PJ Arends29-Apr-04 9:05
professionalPJ Arends29-Apr-04 9:05 
GeneralRe: Pulling Integers from a Binary file.... Pin
David Crow29-Apr-04 9:44
David Crow29-Apr-04 9:44 
If the values were written to disk as char, they need to be read as char. If they were written to disk as int, they need to be read as int.

Consider the following:

CFile file(..., CFile::modeCreate | CFile::modeWrite);
int nAge = 42;
file.Write(&nAge, sizeof(int));
file.Close();
The file contains 4 bytes that look like 0x2a000000. To read that same value back in, I'd use:

file.Open(..., CFile::modeRead);
file.Read(&nAge, sizeof(int));
file.Close();
The variable nAge contains the value 42. Had I used this instead:

file.Open(..., CFile::modeRead);
char str[4];
file.Read(str, sizeof(char) * 4);
file.Close();
The variable str contains the value 0x0000002a. I think the big/little endian concept might be messing you up. PJ's suggestion is plausible, too.


"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)


GeneralWin32 Consol Apps Pin
Anonymous29-Apr-04 7:43
Anonymous29-Apr-04 7:43 
GeneralPassing username/pwd in WebBrowser request Pin
Ravi Bhavnani29-Apr-04 7:07
professionalRavi Bhavnani29-Apr-04 7:07 
GeneralRe: Passing username/pwd in WebBrowser request Pin
l a u r e n29-Apr-04 8:28
l a u r e n29-Apr-04 8:28 
GeneralRe: Passing username/pwd in WebBrowser request Pin
Ravi Bhavnani29-Apr-04 8:38
professionalRavi Bhavnani29-Apr-04 8:38 
GeneralRe: Passing username/pwd in WebBrowser request Pin
l a u r e n29-Apr-04 8:39
l a u r e n29-Apr-04 8:39 
GeneralRe: Passing username/pwd in WebBrowser request Pin
David Crow29-Apr-04 9:27
David Crow29-Apr-04 9:27 
QuestionWhen is MSVCP60.DLL required? Pin
Phenonymous29-Apr-04 5:59
sussPhenonymous29-Apr-04 5:59 
AnswerRe: When is MSVCP60.DLL required? Pin
jmkhael29-Apr-04 6:04
jmkhael29-Apr-04 6:04 
AnswerRe: When is MSVCP60.DLL required? Pin
Nemanja Trifunovic29-Apr-04 6:05
Nemanja Trifunovic29-Apr-04 6:05 
AnswerRe: When is MSVCP60.DLL required? Pin
Navin29-Apr-04 6:11
Navin29-Apr-04 6:11 
AnswerRe: When is MSVCP60.DLL required? Pin
Andrew Walker29-Apr-04 17:05
Andrew Walker29-Apr-04 17:05 
GeneralRe: When is MSVCP60.DLL required? Pin
Chintoo72330-Apr-04 14:17
Chintoo72330-Apr-04 14:17 
GeneralRe: When is MSVCP60.DLL required? Pin
Andrew Walker30-Apr-04 14:58
Andrew Walker30-Apr-04 14:58 
GeneralRe: When is MSVCP60.DLL required? Pin
Chintoo7232-May-04 19:00
Chintoo7232-May-04 19:00 
GeneralRe: When is MSVCP60.DLL required? Pin
Andrew Walker2-May-04 23:54
Andrew Walker2-May-04 23:54 
GeneralRe: When is MSVCP60.DLL required? Pin
Chintoo7233-May-04 3:34
Chintoo7233-May-04 3:34 
GeneralImage Processing & VC++ Pin
Amal_Alazazi29-Apr-04 5:57
Amal_Alazazi29-Apr-04 5:57 

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.