Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to TURN UNICODE ON. Pin
HAHAHA_NEXT16-Mar-04 10:39
HAHAHA_NEXT16-Mar-04 10:39 
GeneralRe: How to TURN UNICODE ON. Pin
David Crow16-Mar-04 10:46
David Crow16-Mar-04 10:46 
GeneralRe: How to TURN UNICODE ON. Pin
HAHAHA_NEXT16-Mar-04 10:52
HAHAHA_NEXT16-Mar-04 10:52 
GeneralRe: How to TURN UNICODE ON. Pin
Gary R. Wheeler16-Mar-04 13:40
Gary R. Wheeler16-Mar-04 13:40 
GeneralRe: How to TURN UNICODE ON. Pin
Michael Dunn16-Mar-04 13:20
sitebuilderMichael Dunn16-Mar-04 13:20 
AnswerRe: How to TURN UNICODE ON. Pin
Sivaji16-Mar-04 19:02
Sivaji16-Mar-04 19:02 
Generalifstream eof() Pin
ns16-Mar-04 8:00
ns16-Mar-04 8:00 
GeneralRe: ifstream eof() Pin
Gary R. Wheeler16-Mar-04 14:10
Gary R. Wheeler16-Mar-04 14:10 
Problem 1: The cout doesn't match the input

I would guess that either your >> operator for the myString class isn't terminating the incoming string properly, or the << is ignoring the string length/terminator.

Problem 2: The loop is traversed 4 times

If you mean that the condition at the top of the while loop is evaluated 4 times, that would be the case. The first three times, the condition is true, and on the last iteration, the condition is false and the body of the loop is skipped.

If the entire body of the loop is executed 4 times, then I would guess that your file contains data like this:
abc^%tytyr''lkl de$f ghi|j\n
abc^%tytyr''lkl de$f ghi|j\n
abc^%tytyr''lkl de$f ghi|j\n
where the \n denotes an end of line character. In that case, it may take 4 reads to get through the data, since the >> operator is probably reading up to (but not including) the end of line. Subsequent >> operations skip over the end of line as whitespace, thereby requiring 4 reads.





Software Zen: delete this;
GeneralRe: ifstream eof() Pin
ns18-Mar-04 1:02
ns18-Mar-04 1:02 
Generalfunction timing Pin
josh052616-Mar-04 7:55
josh052616-Mar-04 7:55 
GeneralRe: function timing Pin
Maximilien16-Mar-04 8:00
Maximilien16-Mar-04 8:00 
GeneralRe: function timing Pin
David Crow16-Mar-04 8:53
David Crow16-Mar-04 8:53 
GeneralGHAAAAAAARGH!!! STATUS_ACCESS VIOLATION Pin
mmica16-Mar-04 6:27
mmica16-Mar-04 6:27 
GeneralRe: GHAAAAAAARGH!!! STATUS_ACCESS VIOLATION Pin
Daniel Turini16-Mar-04 7:48
Daniel Turini16-Mar-04 7:48 
Questionwho know how to make a menu bar in Win32 console application?? Pin
Jeff TTT16-Mar-04 5:56
Jeff TTT16-Mar-04 5:56 
AnswerRe: who know how to make a menu bar in Win32 console application?? Pin
JWood16-Mar-04 6:09
JWood16-Mar-04 6:09 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
Jeff TTT16-Mar-04 6:14
Jeff TTT16-Mar-04 6:14 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
JWood16-Mar-04 7:26
JWood16-Mar-04 7:26 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
Jeff TTT16-Mar-04 7:38
Jeff TTT16-Mar-04 7:38 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
Maximilien16-Mar-04 7:47
Maximilien16-Mar-04 7:47 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
JWood16-Mar-04 8:45
JWood16-Mar-04 8:45 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
JWood16-Mar-04 8:44
JWood16-Mar-04 8:44 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
Jeff TTT16-Mar-04 8:52
Jeff TTT16-Mar-04 8:52 
GeneralRe: who know how to make a menu bar in Win32 console application?? Pin
JWood16-Mar-04 9:03
JWood16-Mar-04 9:03 
AnswerRe: who know how to make a menu bar in Win32 console application?? Pin
Maximilien16-Mar-04 7:51
Maximilien16-Mar-04 7:51 

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.