From: c938021 AT srv1 DOT gbar DOT dtu DOT dk (Lasse Boegede Andersen) Newsgroups: comp.os.msdos.djgpp Subject: Compatibility with Thinking in c++ Date: 10 Feb 1999 11:53:33 GMT Organization: UNI-C Lines: 33 Message-ID: <79rrvt$c86$1@news.net.uni-c.dk> NNTP-Posting-Host: 130.225.87.162 X-Trace: news.net.uni-c.dk 918647613 12550 (None) 130.225.87.162 X-Complaints-To: usenet AT news DOT net DOT uni-c DOT dk X-Newsreader: TIN [version 1.2 PL1] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Maybe this should have been posted to ...learn.c-c++, but here we go. I'm trying to learn c++ and tried to obtain" c++ primer plus:teach yourself..." (S.Prata). It's not going to be reprinted, so I thought I'd check out "Thinking in c++" 2ed by Bruce Eckel (it's free at www.bruceeckel.com), but the exampels seem to be completely incompatible with DJGPP. Am I doing something wrong or is this correct? An example is: //: C18:Stype.cpp // Type a file to standard output #include #include #include "../require.h" using namespace std; int main(int argc, char* argv[]) { requireArgs(argc, 2); // Must have a command line ifstream in(argv[1]); assure(in, argv[1]); // Ensure file exists cout << in.rdbuf(); // Outputs entire file } ///:~ Quest.: #include "../require.h" declare _and_ open 'in' at once assure rdbuf ??? Hope you can help me Regards Lasse