[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

EOF i Windows



Goddag

Jeg har et meget underligt problem i et C++ program jeg sysler med for tiden. Programet kigger bl.a. en fil igennem som skitseret her:

 signed long int c = 0;        // 4 byte stor i Win
 ifstream finput(input, ios::in);

 while (1)
 {

c = finput.get();

   if (c==EOF)
   {
     .....
     .....
   }
   else
   {
     ...
     ...
   }
 }

Det skulle der vidst ikke være noget galt med, hvilket der heller ikke er når jeg oversætter koden under Linux. Jeg ved godt dette er en Linux-C liste men alligevel drister jeg mig til at spørge: Hvorfor reagerer dette program på ASCII-tegn 26 som EOF, når jeg oversætter det i Windåsen? EOF er en int (4 byte stor). Jeg tror ikke at det er en compiler-bug, da jeg har prøvet med flere forskellige (med samme resultat).

Mvh.
Emil Zeuthen
---- -------
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *