From: "Lawrence Rust" Newsgroups: comp.os.msdos.djgpp References: <200301280550 DOT h0S5ohlA017021 AT chac DOT its DOT uow DOT edu DOT au> Subject: Re: scan() in c++ Lines: 56 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: Date: Tue, 28 Jan 2003 13:41:38 -0000 NNTP-Posting-Host: 62.253.142.146 X-Complaints-To: abuse AT ntlworld DOT com X-Trace: newsfep4-win.server.ntli.net 1043761302 62.253.142.146 (Tue, 28 Jan 2003 13:41:42 GMT) NNTP-Posting-Date: Tue, 28 Jan 2003 13:41:42 GMT Organization: ntl Cablemodem News Service To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Hans-Bernhard Broeker" wrote... > Y Chen wrote: > > > #include > > #include > > //#include > > using namespace std; > > > //#include > > #include > > //#include > > > #include > > #include // for memory error handling > > This is a horrible mess. You're mixing new-style C++ standard headers > (without .h) and old-style ones (with .h). And on top of all that, > you throw C headers into the mix. While this may still work, if > you're lucky, it's a rather certain path to confusion. Please try to > avoid that. This is a criticism of the quagmire that has become the C++ standard (template) library. IMHO unless you are determined to wade through the nightmare of i/o streams and its inpenetrable templates then you are better off with C standard FILE's and printf/scanf. > > > #include "LSTM.h" > > The last time you posted this, you were reminded that it's quite > impossible for anybody to help you if you don't cut your problem down > so you can post a reproducible example. You didn't do that: we still > cannot know what is in that "LSTM.h" of yours. > > You're just annoying people, this way. Please stop it. It's quite simple, the first problem is in TLSTM::LoadPar() pFile->scan("NbPredictNextIn:"); pFile is an fstream* declared in TIOBase, as such it doesn't have a scan method; you'll need to implement this. The second error (LSTM1.cpp:45: using typedef-name `std::iostream' after `class') is easily resolved by removing the word class from the call to WriteWeightStream. IMHO it's impenetrable error messages like these that should be a warning to all that using STL streams can be an extremely unpleasant and protracted business. Caveat emptor, or in English, naff ;-) -- Lawrence Rust, Software Systems, www.softsystem.co.uk The problem with Windows XP: http://www.arachnoid.com/boycott