[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] Re: EOF i Windows



> In article <sslug@sslug> you wrote:
> > Jeg kommer stærkt i tvivl!! -- ifølge ISO/IEC 14882:1998(E) existerer begrebet
> > "binary mode" slet ikke i C++!! -- Giv mig lige 14 dage så vender jeg tilbage

Undskyld! - ovenstående er en absolut *bevinget* gang vrøvl(mea culpa)!:

std::ios_base::binary
er så absolut en del af STL C++ *også* i følge IEC/ISO1488:E!!!:

// EX file:
#include <fstream>
int main()
{
  const char* filename= "HelloChar26 World!";

  // create sample test file
  // need not be opened as binary
  std::ofstream SampleFileCreator(filename);
  SampleFileCreator << "Hello" << char(26) << " World!";
  SampleFileCreator.close();

  // create/open sample *binary* reader
  // must be binary
  std::ifstream
    SampleBinaryFileReader(filename, std::ios_base::in | std::ios_base::binary);

  // pass int values of read char to stdout trailed by newline
  for (;SampleBinaryFileReader;)
    std::cout << SampleBinaryFileReader.get() << std::endl;
}
// end EX

Ovenstående der compilerer via Borland skulle besvare Emil Zeuthen spørgsmål.

Håber ikke at mine forkerte oplysninger har givet alt for store problemer.

Hej fra Nils!




 
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] *