Click here to Skip to main content
16,006,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to know that we have reached end of file? Pin
David Crow15-Sep-08 5:08
David Crow15-Sep-08 5:08 
GeneralRe: how to know that we have reached end of file? Pin
toxcct15-Sep-08 5:42
toxcct15-Sep-08 5:42 
GeneralRe: how to know that we have reached end of file? Pin
kapardhi15-Sep-08 19:03
kapardhi15-Sep-08 19:03 
AnswerRe: how to know that we have reached end of file? Pin
Sarath C15-Sep-08 1:36
Sarath C15-Sep-08 1:36 
AnswerRe: how to know that we have reached end of file? Pin
_AnsHUMAN_ 15-Sep-08 1:54
_AnsHUMAN_ 15-Sep-08 1:54 
GeneralRe: how to know that we have reached end of file? Pin
kapardhi15-Sep-08 2:37
kapardhi15-Sep-08 2:37 
GeneralRe: how to know that we have reached end of file? Pin
Hamid_RT15-Sep-08 2:41
Hamid_RT15-Sep-08 2:41 
GeneralRe: how to know that we have reached end of file? Pin
_AnsHUMAN_ 15-Sep-08 2:55
_AnsHUMAN_ 15-Sep-08 2:55 
Don't use _eof if you are using CStdioFile.
Check this out:
CFile::Read returns the actual number of bytes read. If this number is less than the bytes requested, then the end of file has been reached.

CStdioFile::ReadString returns a NULL pointer when the end of file has been reached.
so when ReadString returns NULL you know the end of file is reached else continue with your usual functionality.
Hope it makes sense for you now...

kapardhi wrote:
now tell me how to use _eof

(PS) Had you filed the details properly mentioning that you are using CStdioFile I would have offered the right solution in the first go... Frown | :(

Somethings seem HARD to do, until we know how to do them.
Wink | ;-) _AnShUmAn_

Questiondelete registry key values Pin
Madan Chauhan15-Sep-08 0:17
Madan Chauhan15-Sep-08 0:17 
AnswerRe: delete registry key values Pin
Joseph Marzbani15-Sep-08 0:37
Joseph Marzbani15-Sep-08 0:37 
AnswerRe: delete registry key values Pin
kapardhi15-Sep-08 0:52
kapardhi15-Sep-08 0:52 
GeneralRe: delete registry key values Pin
Madan Chauhan15-Sep-08 1:19
Madan Chauhan15-Sep-08 1:19 
GeneralRe: delete registry key values Pin
kapardhi15-Sep-08 3:10
kapardhi15-Sep-08 3:10 
QuestionRe: delete registry key values Pin
David Crow15-Sep-08 5:12
David Crow15-Sep-08 5:12 
AnswerRe: delete registry key values Pin
Rane15-Sep-08 0:55
Rane15-Sep-08 0:55 
GeneralRe: delete registry key values Pin
Madan Chauhan15-Sep-08 1:37
Madan Chauhan15-Sep-08 1:37 
AnswerRe: delete registry key values Pin
Hamid_RT15-Sep-08 2:00
Hamid_RT15-Sep-08 2:00 
QuestionHow to make fast FTP client? Pin
Gofur Halmurat15-Sep-08 0:04
Gofur Halmurat15-Sep-08 0:04 
AnswerRe: How to make fast FTP client? Pin
Garth J Lancaster15-Sep-08 0:36
professionalGarth J Lancaster15-Sep-08 0:36 
GeneralRe: How to make fast FTP client? Pin
Gofur Halmurat15-Sep-08 0:49
Gofur Halmurat15-Sep-08 0:49 
Question[Message Deleted] Pin
Joseph Marzbani14-Sep-08 23:42
Joseph Marzbani14-Sep-08 23:42 
AnswerRe: Hello "toxcct"! a minute please ... [modified] Pin
toxcct14-Sep-08 23:51
toxcct14-Sep-08 23:51 
GeneralRe: Hello "toxcct"! a minute please ... Pin
Joseph Marzbani15-Sep-08 0:42
Joseph Marzbani15-Sep-08 0:42 
QuestionExtract images & banners from website Pin
Sandeep Saini SRE14-Sep-08 23:40
Sandeep Saini SRE14-Sep-08 23:40 
QuestionHow can I get rid of linker warning: "LINK : warning LNK4089: all references to 'OLEAUT32.dll' discarded by /OPT:REF" ??? Pin
rbid14-Sep-08 23:30
rbid14-Sep-08 23:30 

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.