Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC Document/View - New Milestone :: C++ Pin
Paul M Watt21-Feb-02 21:18
mentorPaul M Watt21-Feb-02 21:18 
GeneralRe: MFC Document/View - New Milestone :: C++ Pin
valikac22-Feb-02 5:03
valikac22-Feb-02 5:03 
GeneralRe: MFC Document/View - New Milestone :: C++ Pin
Paul M Watt22-Feb-02 7:01
mentorPaul M Watt22-Feb-02 7:01 
GeneralRe: MFC Document/View - New Milestone :: C++ Pin
valikac22-Feb-02 10:10
valikac22-Feb-02 10:10 
GeneralRe: MFC Document/View - New Milestone :: C++ Pin
22-Feb-02 2:59
suss22-Feb-02 2:59 
Generalfile - streams... Pin
Bernhard21-Feb-02 19:55
Bernhard21-Feb-02 19:55 
GeneralRe: file - streams... Pin
Joaquín M López Muñoz21-Feb-02 20:16
Joaquín M López Muñoz21-Feb-02 20:16 
GeneralRe: file - streams... Pin
Bernhard21-Feb-02 20:38
Bernhard21-Feb-02 20:38 
yeah.. it really works.. so i've cut out the original code.. cause it is a little bit more complex.. but i thought i cut it down to the "root of its evil"

while (1)
{
   if (!std::getline (file, line1))
      break;
		
   std::streampos here = file.tellg();
   std::getline (file, line2);
   file.seekg (here);
   ....
}


well.. the code is something like 2 steps forward, one step back.. i use this because i need the context of every single line in the text file..
it works perfectly for text files where the last line is terminated with CR+LF, but if the file is not terminated with CR+LF it breaks when reading this line.. and not when the EOF is reached..

thanks in advance
bernhard


Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
GeneralRe: file - streams... Pin
Joaquín M López Muñoz21-Feb-02 22:45
Joaquín M López Muñoz21-Feb-02 22:45 
GeneralRe: file - streams... Pin
Bernhard22-Feb-02 0:06
Bernhard22-Feb-02 0:06 
GeneralRe: file - streams... Pin
22-Feb-02 9:18
suss22-Feb-02 9:18 
General2D Color Gradient or Ramp Pin
Paul Selormey21-Feb-02 17:50
Paul Selormey21-Feb-02 17:50 
GeneralRe: 2D Color Gradient or Ramp Pin
Christian Graus21-Feb-02 18:16
protectorChristian Graus21-Feb-02 18:16 
GeneralRe: 2D Color Gradient or Ramp Pin
Paul Selormey23-Feb-02 19:50
Paul Selormey23-Feb-02 19:50 
GeneralMemory DC to CBitmap object Pin
Wolfram Steinke21-Feb-02 17:33
Wolfram Steinke21-Feb-02 17:33 
GeneralRe: Memory DC to CBitmap object Pin
Christian Graus21-Feb-02 18:19
protectorChristian Graus21-Feb-02 18:19 
Generalquestion about LNK2005 and LINK1169 Pin
RK_200021-Feb-02 11:52
RK_200021-Feb-02 11:52 
GeneralRe: question about LNK2005 and LINK1169 Pin
Michael Dunn21-Feb-02 12:11
sitebuilderMichael Dunn21-Feb-02 12:11 
GeneralThis BSTR** business is dirty!!! Pin
Nish Nishant21-Feb-02 11:50
sitebuilderNish Nishant21-Feb-02 11:50 
GeneralRe: This BSTR** business is dirty!!! Pin
Derek Waters21-Feb-02 11:51
Derek Waters21-Feb-02 11:51 
GeneralRe: This BSTR** business is dirty!!! Pin
Nish Nishant21-Feb-02 12:04
sitebuilderNish Nishant21-Feb-02 12:04 
GeneralUnbelievable error when attempting to return a BSTR** as retval Pin
Nish Nishant21-Feb-02 11:39
sitebuilderNish Nishant21-Feb-02 11:39 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Felix Cho21-Feb-02 11:54
Felix Cho21-Feb-02 11:54 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Derek Waters21-Feb-02 11:50
Derek Waters21-Feb-02 11:50 
GeneralRe: Unbelievable error when attempting to return a BSTR** as retval Pin
Felix Cho21-Feb-02 11:55
Felix Cho21-Feb-02 11:55 

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.