Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to hide the web browser control Pin
Nish Nishant8-Mar-03 10:49
sitebuilderNish Nishant8-Mar-03 10:49 
GeneralRe: How to hide the web browser control Pin
Hesham Amin8-Mar-03 11:13
Hesham Amin8-Mar-03 11:13 
QuestionExit code 136? Pin
Jason Henderson8-Mar-03 10:22
Jason Henderson8-Mar-03 10:22 
GeneralMessage routing Pin
AnTri8-Mar-03 6:57
AnTri8-Mar-03 6:57 
GeneralRe: Message routing Pin
Kuniva8-Mar-03 7:25
Kuniva8-Mar-03 7:25 
Generalfclose() error Pin
Kuniva8-Mar-03 6:00
Kuniva8-Mar-03 6:00 
GeneralRe: fclose() error Pin
Chris Losinger8-Mar-03 6:43
professionalChris Losinger8-Mar-03 6:43 
GeneralRe: fclose() error Pin
Kuniva8-Mar-03 7:16
Kuniva8-Mar-03 7:16 
the string is 3 characters("npf"), but i thought it was like this:
id[0]="n"
id[1]="p"
id[2]="f"

and since it is id[3] there should be enough room.. right?

so dont u mean longer than 3 characters?

and i also thought the fscanf function reads in the data dependant of the size of the variable that is passed, so that it cant overrun the buffer...
or is this incorrect? i'm just guessing though, it's what i'd presume since there arent any other parameters passed to fscanf() which indicate what length it is.

But anyways, that cant be the problem anyways because i can display the id fine in a messagebox, the error only shows when i use fclose() or maybe after that... i'm not sure, because this is code for a function in a class i am writing. This is what i do(the class is called CNPFfile):

int main(int argc, char *argv[])
{
    CNPFfile npf("npffile.npf");
    BOOL bv = npf.IsValidNpfFile();
    return 1;
}


I also tried opening the file in "r" mode, that didnt help.

Thank you kindly

Kuniva
--------------------------------------------
GeneralRe: fclose() error Pin
Chris Losinger8-Mar-03 8:28
professionalChris Losinger8-Mar-03 8:28 
GeneralRe: fclose() error Pin
Kuniva8-Mar-03 7:42
Kuniva8-Mar-03 7:42 
GeneralRe: fclose() error Pin
Tim Smith8-Mar-03 16:13
Tim Smith8-Mar-03 16:13 
GeneralRe: fclose() error Pin
Kuniva8-Mar-03 8:11
Kuniva8-Mar-03 8:11 
GeneralRe: fclose() error Pin
Abbas_Riazi8-Mar-03 18:04
professionalAbbas_Riazi8-Mar-03 18:04 
GeneralModifyStyle dynamically Pin
Gumball8-Mar-03 5:37
Gumball8-Mar-03 5:37 
GeneralSchool Project in C Pin
Claus Jobes8-Mar-03 4:58
Claus Jobes8-Mar-03 4:58 
GeneralRe: School Project in C Pin
dog_spawn8-Mar-03 6:58
dog_spawn8-Mar-03 6:58 
GeneralRe: School Project in C Pin
Claus Jobes8-Mar-03 7:05
Claus Jobes8-Mar-03 7:05 
GeneralRe: School Project in C Pin
yaname8-Mar-03 12:38
yaname8-Mar-03 12:38 
GeneralRe: School Project in C Pin
Claus Jobes8-Mar-03 15:06
Claus Jobes8-Mar-03 15:06 
QuestionHow to detect that cd rom drive is opened? Pin
Mukkie8-Mar-03 3:39
Mukkie8-Mar-03 3:39 
GeneralCProgressBar Pin
wavewave8-Mar-03 1:19
wavewave8-Mar-03 1:19 
GeneralRe: CProgressBar Pin
AnTri8-Mar-03 7:11
AnTri8-Mar-03 7:11 
GeneralRe: CProgressBar Pin
wavewave8-Mar-03 23:28
wavewave8-Mar-03 23:28 
GeneralRe: CProgressBar Pin
AnTri9-Mar-03 0:39
AnTri9-Mar-03 0:39 
GeneralRe: CProgressBar Pin
AnTri9-Mar-03 0:40
AnTri9-Mar-03 0:40 

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.