Click here to Skip to main content
15,900,724 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: OnInitialUpdate CSplitterWnd Pin
David Crow10-Mar-06 8:28
David Crow10-Mar-06 8:28 
AnswerRe: OnInitialUpdate CSplitterWnd Pin
23_44410-Mar-06 8:37
23_44410-Mar-06 8:37 
Questiontxt file Pin
chaitanya2210-Mar-06 6:22
chaitanya2210-Mar-06 6:22 
QuestionRe: txt file Pin
David Crow10-Mar-06 6:34
David Crow10-Mar-06 6:34 
AnswerRe: txt file Pin
chaitanya2211-Mar-06 0:23
chaitanya2211-Mar-06 0:23 
GeneralRe: txt file Pin
David Crow13-Mar-06 2:42
David Crow13-Mar-06 2:42 
AnswerRe: txt file Pin
Hamid_RT10-Mar-06 6:54
Hamid_RT10-Mar-06 6:54 
AnswerRe: txt file Pin
gamitech10-Mar-06 7:01
gamitech10-Mar-06 7:01 
if you meant the values of and array in a txt file you can use the binary files to write the whole array in it but binary mode.

f=fopen(fname,"bw");
fwrite(array,1,sizeof(int)*nr_of_items,f);
fclose(f);

but if you want the values to be readable you must convert them first to chars and then write them.
char nr[10];
/*if array declared like this int array[100] or int *array*/
f=fopen(fname,"w+");
for (int i=0;i<nr_of_items;i++)
{
_itoa(*array,nr,10);
fwrite(nr,1,strlen(nr),f);
array++;
}
fclose(f);
the main="" thing="" is="" that="" you="" can="" write="" any="" kind="" of="" data="" variable="" in="" a="" binary="" file="" otherwise="" will="" have="" to="" make="" convension="" it="" text="" file.="" sometihng="" like="" this:
1="" line="" the="" nr="" entries
2="" length="" each="" entry="" if="" they="" are="" all="" equal
3="" -=""> nr_of_items line the entries
or something like this.
have fun

gabby
AnswerRe: txt file Pin
ThatsAlok10-Mar-06 18:19
ThatsAlok10-Mar-06 18:19 
QuestionFeature lock and unlock Pin
raybert10-Mar-06 6:18
raybert10-Mar-06 6:18 
AnswerRe: Feature lock and unlock Pin
Rster02111110-Mar-06 6:29
Rster02111110-Mar-06 6:29 
AnswerRe: Feature lock and unlock Pin
Maximilien10-Mar-06 6:43
Maximilien10-Mar-06 6:43 
QuestionCreate Child window in Visual C++ 6 Pin
Salad Juris10-Mar-06 6:00
Salad Juris10-Mar-06 6:00 
AnswerRe: Create Child window in Visual C++ 6 Pin
David Crow10-Mar-06 6:36
David Crow10-Mar-06 6:36 
GeneralRe: Create Child window in Visual C++ 6 Pin
Salad Juris10-Mar-06 6:54
Salad Juris10-Mar-06 6:54 
QuestionRe: Create Child window in Visual C++ 6 Pin
David Crow10-Mar-06 7:46
David Crow10-Mar-06 7:46 
AnswerRe: Create Child window in Visual C++ 6 Pin
Salad Juris10-Mar-06 8:00
Salad Juris10-Mar-06 8:00 
QuestionRe: Create Child window in Visual C++ 6 Pin
David Crow10-Mar-06 8:10
David Crow10-Mar-06 8:10 
AnswerRe: Create Child window in Visual C++ 6 Pin
Salad Juris10-Mar-06 8:15
Salad Juris10-Mar-06 8:15 
QuestionRe: Create Child window in Visual C++ 6 Pin
David Crow10-Mar-06 8:23
David Crow10-Mar-06 8:23 
AnswerRe: Create Child window in Visual C++ 6 Pin
Salad Juris10-Mar-06 8:32
Salad Juris10-Mar-06 8:32 
QuestionRe: Create Child window in Visual C++ 6 Pin
David Crow10-Mar-06 8:56
David Crow10-Mar-06 8:56 
AnswerRe: Create Child window in Visual C++ 6 Pin
Salad Juris10-Mar-06 9:04
Salad Juris10-Mar-06 9:04 
QuestionRe: Create Child window in Visual C++ 6 Pin
David Crow10-Mar-06 9:35
David Crow10-Mar-06 9:35 
AnswerRe: Create Child window in Visual C++ 6 Pin
Salad Juris10-Mar-06 9:41
Salad Juris10-Mar-06 9:41 

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.