Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File I/O que Pin
ThatsAlok26-Dec-05 23:51
ThatsAlok26-Dec-05 23:51 
AnswerRe: File I/O que Pin
toxcct26-Dec-05 22:40
toxcct26-Dec-05 22:40 
GeneralRe: File I/O que Pin
LiYS26-Dec-05 22:47
LiYS26-Dec-05 22:47 
GeneralRe: File I/O que Pin
LiYS26-Dec-05 22:51
LiYS26-Dec-05 22:51 
GeneralRe: File I/O que Pin
Prakash Nadar27-Dec-05 0:03
Prakash Nadar27-Dec-05 0:03 
GeneralRe: File I/O que Pin
vikas amin27-Dec-05 0:43
vikas amin27-Dec-05 0:43 
AnswerRe: File I/O que Pin
Owner drawn26-Dec-05 23:22
Owner drawn26-Dec-05 23:22 
AnswerRe: File I/O que Pin
krmed27-Dec-05 4:57
krmed27-Dec-05 4:57 
LiYS wrote:
CFile file;
if ( ! file.Open(LPCTSTR ("C:\\Test.xml"), CFile::modeRead ) ) { return; }


If this code is in function X, then as soon as you leave function X, the CFile object is destroyed (it goes out of scope). Thus the file will be closed.

Hope that helps.

Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
QuestionHOT TO TYPE CAST OJBECT TO VARIANT Pin
gpshadrach26-Dec-05 21:45
gpshadrach26-Dec-05 21:45 
AnswerRe: HOT TO TYPE CAST OJBECT TO VARIANT Pin
AntonGogolev26-Dec-05 21:58
AntonGogolev26-Dec-05 21:58 
Questiontemplate class Pin
Nishad S26-Dec-05 21:29
Nishad S26-Dec-05 21:29 
AnswerRe: template class Pin
vikas amin27-Dec-05 0:49
vikas amin27-Dec-05 0:49 
QuestionGUId of a COM object Pin
ragavan26-Dec-05 21:25
ragavan26-Dec-05 21:25 
AnswerRe: GUId of a COM object Pin
AntonGogolev26-Dec-05 22:05
AntonGogolev26-Dec-05 22:05 
Questionwarning C4509: nonstandard extension used: Pin
Chintoo72326-Dec-05 20:43
Chintoo72326-Dec-05 20:43 
AnswerRe: warning C4509: nonstandard extension used: Pin
toxcct26-Dec-05 22:49
toxcct26-Dec-05 22:49 
QuestionC\C++ with Expat Pin
praveenanil0426-Dec-05 20:06
praveenanil0426-Dec-05 20:06 
QuestionAre static members auto removed from HEAP ? Pin
Owner drawn26-Dec-05 18:01
Owner drawn26-Dec-05 18:01 
AnswerRe: Are static members auto removed from HEAP ? Pin
asdfkjsodifuweior26-Dec-05 18:34
asdfkjsodifuweior26-Dec-05 18:34 
GeneralRe: Are static members auto removed from HEAP ? Pin
vikas amin26-Dec-05 18:52
vikas amin26-Dec-05 18:52 
GeneralThen where are they allocated! Pin
Owner drawn26-Dec-05 18:57
Owner drawn26-Dec-05 18:57 
General[Message Deleted] Pin
Sheng Jiang 蒋晟26-Dec-05 19:41
Sheng Jiang 蒋晟26-Dec-05 19:41 
GeneralRe: Then where are they allocated! Pin
Owner drawn26-Dec-05 19:53
Owner drawn26-Dec-05 19:53 
General[Message Deleted] Pin
Sheng Jiang 蒋晟26-Dec-05 20:08
Sheng Jiang 蒋晟26-Dec-05 20:08 
GeneralRe: Then where are they allocated! Pin
Owner drawn26-Dec-05 20:39
Owner drawn26-Dec-05 20:39 

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.