Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionsending click message to child button of a window. Pin
_T("No name")7-Jan-10 18:28
_T("No name")7-Jan-10 18:28 
QuestionRe: sending click message to child button of a window. Pin
Nelek7-Jan-10 20:38
protectorNelek7-Jan-10 20:38 
AnswerRe: sending click message to child button of a window. Pin
_T("No name")11-Jan-10 21:52
_T("No name")11-Jan-10 21:52 
AnswerRe: sending click message to child button of a window. Pin
Roger Allen13-Jan-10 5:12
Roger Allen13-Jan-10 5:12 
GeneralRe: sending click message to child button of a window. Pin
_T("No name")13-Jan-10 5:55
_T("No name")13-Jan-10 5:55 
GeneralRe: sending click message to child button of a window. Pin
Roger Allen13-Jan-10 6:09
Roger Allen13-Jan-10 6:09 
GeneralRe: sending click message to child button of a window. Pin
_T("No name")13-Jan-10 6:20
_T("No name")13-Jan-10 6:20 
QuestionWhy does it print junk characters ? Pin
krish_kumar7-Jan-10 17:50
krish_kumar7-Jan-10 17:50 
The following code snippet read data from keyboard and write into one file;
and read that file and display it on screen....But it displays junk characters....

What may be the problem ...?



// main.c

#include <stdio.h>

int main(void){

char ch;

FILE *fp;

fp = fopen("test_file_src","w");

printf("\n Eneter the data (type Ctrl^D at end :\n");

if (fp != NULL) {

while(ch = getchar() != EOF)
fputc(ch ,fp);
} else {
printf("\n Unable to create file \n");
}

fclose(fp);



printf("\n\n Reading from file\n\n ");

fp = fopen("test_file_src","r");

if (fp != NULL) {

while(!feof(fp)) { // Move up to end of file

ch = fgetc(fp);
putchar(ch);
}

} else {
printf("\n Unable to process file \n");
}

fclose(fp); // Close file
printf("\n\n\n");


return 0;
}

/* Output


Enter the data (type Ctrl^D at end :
11111111111111222
2222222222222222222
22222222222222222


Reading from file






AnswerRe: Why does it print junk characters ? Pin
oggenok647-Jan-10 18:34
oggenok647-Jan-10 18:34 
QuestionDifferent (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 17:50
Brien Smith-Martinez7-Jan-10 17:50 
AnswerRe: Different (Wrong) answers when not debugging Pin
Garth J Lancaster7-Jan-10 18:16
professionalGarth J Lancaster7-Jan-10 18:16 
GeneralRe: Different (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 23:08
Brien Smith-Martinez7-Jan-10 23:08 
GeneralRe: Different (Wrong) answers when not debugging Pin
Garth J Lancaster9-Jan-10 14:01
professionalGarth J Lancaster9-Jan-10 14:01 
QuestionRe: Different (Wrong) answers when not debugging Pin
CPallini7-Jan-10 22:09
mveCPallini7-Jan-10 22:09 
AnswerRe: Different (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 23:06
Brien Smith-Martinez7-Jan-10 23:06 
AnswerRe: Different (Wrong) answers when not debugging Pin
KarstenK7-Jan-10 23:20
mveKarstenK7-Jan-10 23:20 
QuestionHow to save content in IPicture to JPG format? Pin
Jingcheng7-Jan-10 9:04
Jingcheng7-Jan-10 9:04 
QuestionRe: How to save content in IPicture to JPG format? Pin
David Crow7-Jan-10 11:02
David Crow7-Jan-10 11:02 
AnswerRe: How to save content in IPicture to JPG format? Pin
Jingcheng7-Jan-10 13:29
Jingcheng7-Jan-10 13:29 
GeneralRe: How to save content in IPicture to JPG format? Pin
Hamid_RT7-Jan-10 20:40
Hamid_RT7-Jan-10 20:40 
Question[Solved]Network messages not being sent to the window procedure when using asynchrnous sockets [modified] Pin
zoopp7-Jan-10 7:53
zoopp7-Jan-10 7:53 
AnswerRe: Network messages not being sent to the window procedure when using asynchrnous sockets Pin
Richard MacCutchan7-Jan-10 9:05
mveRichard MacCutchan7-Jan-10 9:05 
AnswerRe: Network messages not being sent to the window procedure when using asynchrnous sockets Pin
Moak7-Jan-10 9:44
Moak7-Jan-10 9:44 
GeneralRe: Network messages not being sent to the window procedure when using asynchrnous sockets Pin
zoopp8-Jan-10 2:32
zoopp8-Jan-10 2:32 
QuestionScanline Polygon Fill Algorithm ??? Pin
a04.lqd7-Jan-10 7:48
a04.lqd7-Jan-10 7:48 

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.