Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: writing binary file... Pin
David Crow10-Mar-04 2:07
David Crow10-Mar-04 2:07 
Your code is incorrect. The variable Demographics is not a pointer so using new is in error. If you want 1,000 of them, simply use:

struct
{ 
...
} Demographics[1000]; 
Ming Yan wrote:
The value of '1' in fwrite(...) should reflect the no of records I have in d struct rite?

Correct.

Ming Yan wrote:
But how do i ask the program to detect the it's value upon opening the file?

If the size of the structure is 78 and the size of the file is 468, you know that there are 6 records.

Ming Yan wrote:
Or do I have to create a header to the file to specify the number of records in d file?

There's nothing wrong with this idea.


"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
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 
GeneralRe: Events in hidden dialogs (and services) Pin
l a u r e n8-Mar-04 15:36
l a u r e n8-Mar-04 15:36 

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.