|
From: Bob W. <bo...@ph...> - 2002-06-05 19:16:26
|
Daniel, > Why? don't understand why that is the solution. > Unless there's more to the code than the one file. Perhaps a little background is in order. I typed the programs in directly from the text and was presented with the error previously discussed, i.e., the compiler could not find an "ios" file to include. When I commented that compiler command line out, the program compiled and ran just fine. While searching around for an answer, I came across the source files for the book on the Internet. The program upon which I was working had the "#ifndef" and "#endif" bookends to the "#include <ios>" statement. When I modified my code that way, the program compiled and ran just fine. I suspect there is an incompatibility with the compiler which the authors discovered. Regards, Bob ************************* > >From: "Bob Wilson" <bo...@ph...> > >To: "Dev-C++ User Mailing List" <dev...@li...> > >Subject: [Dev-C++] #include <ios> > >Date: Wed, 5 Jun 2002 08:44:39 -0500 > > > > > >I found the solution > > > > > I am working my way through Andrews Koenig's and Barbara E. Moo's book > > > "Accelerated C++, Practical Programming by Example" and have a bit of a > > > problem with an include file. The program starts: > > > > > > #include <iomanip> > > > #include <iostream> > > > #include <string> > > > #include <ios> > > > > > > using std::cin; using std::setprecision; > > > using std::cout; using std::string; > > > using std::endl; using std::streamsize; > > > > > > Unfortunately I get the following error message: > > > > > > "ios: No such file or directory" > > > > > > MSVC .NET compiles it just fine. What am I missing? > > > > > >It is: > > > >#include <iomanip> > >#include <iostream> > >#include <string> > >#ifndef __GNUC__ > >#include <ios> > >#endif > > > >Regards, > > > >Bob Wilson > > > > > > > > > >_______________________________________________________________ > > > >Don't miss the 2002 Sprint PCS Application Developer's Conference > >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > |