[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
 

Re: [CPROG] End of file? (Beginning of file??)



At 21:10 29/01/03, Erwin S. Andreasen wrote:
.....
>Som jeg skrev i mit tidligere brev, så checker .eof() om der opstod en
>EOF fejl tidligere, og *ikke* om den næste indlæsning vil lykkes.
>
>Derfor skal du når du indlæser en værdi, checke om indlæsningen
>lykkedes og ikke med det samme bruge værdien.
...
OK, jeg kan godt se, at
"while (infile >> price)..."
er at foretrække, det andet forekommer (unødigt?) kompliceret - for en
begynder, i hvert tilfælde!

Jeg oplevede i øvrigt noget andet 'mystisk':
Hvis jeg tilbagekopierede det program, jeg citerede i første mail, til min
editor, kunne det ikke længere kompilere - selvom det 'så rigtigt ud':

Skønt der (korrekt) stod:
...
void main( void )
  {....

sendte compileren (g++) en 'parse error' foran '{'!

Og der kom flere fejl, bla. noget med '0240' og med variabler der ikke var
erklæret (de *var* korrekt erklærede!)

Tilsyneladende kan en editor 'gemme noget', som ikke kan ses på skærmen -
og som compileren ikke 'forstår'!?

For at få mit program kompileret igen, måtte jeg til sidst taste hvert
enkelt tegn ind i editoren - så virkede det!

mvh
Hans




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 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] *