Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Book about automation Pin
Michael P Butler8-Mar-04 23:41
Michael P Butler8-Mar-04 23:41 
GeneralRe: Book about automation Pin
Member 7389389-Mar-04 0:41
Member 7389389-Mar-04 0:41 
Generalsending ARP packet Pin
Imtiaz Murtaza8-Mar-04 20:37
Imtiaz Murtaza8-Mar-04 20:37 
Generalwriting binary file Pin
Ming Yan8-Mar-04 20:25
Ming Yan8-Mar-04 20:25 
GeneralRe: writing binary file Pin
David Crow9-Mar-04 2:35
David Crow9-Mar-04 2:35 
GeneralRe: writing binary file Pin
Prakash Nadar9-Mar-04 2:45
Prakash Nadar9-Mar-04 2:45 
GeneralRe: writing binary file Pin
David Crow9-Mar-04 3:29
David Crow9-Mar-04 3:29 
GeneralRe: writing binary file... Pin
Ming Yan9-Mar-04 17:02
Ming Yan9-Mar-04 17:02 
Hi again...

Thanks for d info...I guess I've got d method rite after all. But I couldnt seem to get all d data stored correctly upon reading the binary file.

Here's how I did it...

struct{
...
} Demographics;

Demographics demo = new Demographics [1000];

FILE *pFile = fopen(..., "wb");
fwrite(demo, sizeof(Demographics), 1, pFile);
fclose(pFile);
...
FILE *pFile = fopen(..., "rb");
fread(demo, sizeof(Demographics), 1, pFile);
fclose(pFile);

The value of '1' in fwrite(...) should reflect the no of records I have in d struct rite? But how do i ask the program to detect the it's value upon opening the file? Is there a function that can do that? Or do I have to create a header to the file to specify the number of records in d file?

Thanks again...

Rgrds.
GeneralRe: writing binary file... Pin
David Crow10-Mar-04 2:07
David Crow10-Mar-04 2:07 
GeneralHiding drive letter from MYComputer Pin
Imtiaz Murtaza8-Mar-04 19:11
Imtiaz Murtaza8-Mar-04 19:11 
GeneralRe: Hiding drive letter from MYComputer Pin
ian mariano8-Mar-04 19:50
ian mariano8-Mar-04 19:50 
GeneralProblem with SetLayeredWindowAttributes () Pin
Jijo.Raj8-Mar-04 17:52
Jijo.Raj8-Mar-04 17:52 
GeneralRe: Problem with SetLayeredWindowAttributes () Pin
GDavy8-Mar-04 19:32
GDavy8-Mar-04 19:32 
GeneralRe: Problem with SetLayeredWindowAttributes () Pin
Jijo.Raj8-Mar-04 19:56
Jijo.Raj8-Mar-04 19:56 
GeneralSkinning Framework Pin
Anonymous8-Mar-04 16:13
Anonymous8-Mar-04 16:13 
GeneralRe: Skinning Framework Pin
Prakash Nadar8-Mar-04 17:55
Prakash Nadar8-Mar-04 17:55 
GeneralCodeWarrior C++ Programming Pin
Montree S.8-Mar-04 16:07
Montree S.8-Mar-04 16:07 
GeneralRe: CodeWarrior C++ Programming Pin
Antti Keskinen8-Mar-04 18:23
Antti Keskinen8-Mar-04 18:23 
Generalhelp with command line arguments... Pin
Snyp8-Mar-04 16:05
Snyp8-Mar-04 16:05 
GeneralRe: help with command line arguments... Pin
ian mariano8-Mar-04 18:41
ian mariano8-Mar-04 18:41 
GeneralRe: help with command line arguments... Pin
ian mariano8-Mar-04 18:45
ian mariano8-Mar-04 18:45 
GeneralRe: help with command line arguments... Pin
Snyp9-Mar-04 13:36
Snyp9-Mar-04 13:36 
QuestionGet File name from HFILE? Pin
novachen8-Mar-04 15:30
novachen8-Mar-04 15:30 
AnswerRe: Get File name from HFILE? Pin
ian mariano8-Mar-04 19:03
ian mariano8-Mar-04 19:03 
GeneralEvents in hidden dialogs (and services) Pin
mmica8-Mar-04 12:52
mmica8-Mar-04 12:52 

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.