Click here to Skip to main content
15,891,816 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralURL opens application Pin
Florin Ochiana17-Mar-04 1:49
Florin Ochiana17-Mar-04 1:49 
QuestionHow to use CheckMenuItem()???????? Pin
Anonymous17-Mar-04 1:46
Anonymous17-Mar-04 1:46 
AnswerRe: How to use CheckMenuItem()???????? Pin
Florin Ochiana17-Mar-04 2:00
Florin Ochiana17-Mar-04 2:00 
GeneralRe: How to use CheckMenuItem()???????? Pin
Anonymous17-Mar-04 2:10
Anonymous17-Mar-04 2:10 
GeneralRe: How to use CheckMenuItem()???????? Pin
Florin Ochiana17-Mar-04 2:19
Florin Ochiana17-Mar-04 2:19 
GeneralThank u very much!! Pin
Anonymous17-Mar-04 2:39
Anonymous17-Mar-04 2:39 
AnswerRe: How to use CheckMenuItem()???????? Pin
Maximilien17-Mar-04 2:33
Maximilien17-Mar-04 2:33 
Generalcin >> question Pin
ns17-Mar-04 1:16
ns17-Mar-04 1:16 
I am reading from 2 datafiles with three entries:

File 1:
--------
abc
def
ghi
--------

file 2: has an extra blank line after ghi
---------
abc
def
ghi

--------

If I have an ifstream object 'fin' and I do

char val;
while (!fin.eof())
{
fin >> val;

cout << val;
}

For file 1 I get the output as
abc
def
ghi

as expected.

But for file 2 I get

abc
def
ghi
ghi

1.Why is this?

2.How can I prevent it from processing any extra blank lines?

thanks,
ns
GeneralRe: cin &gt;&gt; question Pin
David Crow17-Mar-04 2:27
David Crow17-Mar-04 2:27 
GeneralRe: cin &gt;&gt; question Pin
Anonymous17-Mar-04 22:11
Anonymous17-Mar-04 22:11 
GeneralRe: cin &gt;&gt; question Pin
David Crow19-Mar-04 3:25
David Crow19-Mar-04 3:25 
GeneralProperty sheets and pages Pin
Anonymous17-Mar-04 0:56
Anonymous17-Mar-04 0:56 
GeneralRe: Property sheets and pages Pin
Nirav Doshi17-Mar-04 1:28
Nirav Doshi17-Mar-04 1:28 
GeneralRe: Property sheets and pages Pin
thowra17-Mar-04 1:52
thowra17-Mar-04 1:52 
GeneralDetecting if a print job failed Pin
tcss16-Mar-04 23:58
tcss16-Mar-04 23:58 
GeneralRe: Detecting if a print job failed Pin
Blake Miller17-Mar-04 7:45
Blake Miller17-Mar-04 7:45 
GeneralRe: Detecting if a print job failed Pin
tcss17-Mar-04 20:20
tcss17-Mar-04 20:20 
GeneralGDI+ and bitmap resources Pin
bouli16-Mar-04 23:10
bouli16-Mar-04 23:10 
GeneralRe: GDI+ and bitmap resources Pin
Anonymous16-Mar-04 23:31
Anonymous16-Mar-04 23:31 
GeneralRe: GDI+ and bitmap resources Pin
bouli17-Mar-04 0:34
bouli17-Mar-04 0:34 
GeneralRe: GDI+ and bitmap resources Pin
wb17-Mar-04 1:03
wb17-Mar-04 1:03 
GeneralRe: GDI+ and bitmap resources Pin
bouli17-Mar-04 5:01
bouli17-Mar-04 5:01 
GeneralInstalling .NET Pin
Anonymous16-Mar-04 22:33
Anonymous16-Mar-04 22:33 
GeneralRe: Installing .NET Pin
Prakash Nadar16-Mar-04 23:08
Prakash Nadar16-Mar-04 23:08 
GeneralRe: Installing .NET Pin
Anonymous16-Mar-04 23:12
Anonymous16-Mar-04 23:12 

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.