<html><div style='background-color:'><DIV>
<P>#include <iostream.h> is OLD???? How long has it been considered old? I did an expensive course, finished in September, and it used #include <iostream.h> all the time. You say it's not ANSI C++ ???</P>
<P>Help me out here would you?<BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>>From: Luigi Santillo <GI...@LI...>
<DIV></DIV>>To: dev...@li...
<DIV></DIV>>Subject: Re: [Dev-C++] Re: Execution Error !?
<DIV></DIV>>Date: Thu, 10 Jan 2002 19:24:05 +0100
<DIV></DIV>>
<DIV></DIV>>Hi Vince
<DIV></DIV>>
<DIV></DIV>>Your code has to be tuned, try these two things:
<DIV></DIV>>
<DIV></DIV>>- each line of the file "test.dat" consists of 7 integers, I suppose
<DIV></DIV>>you
<DIV></DIV>>use the first integer of the row as a marker and the other 6 as
<DIV></DIV>>data;
<DIV></DIV>>instead of reading "pclass" + 5 integers try "pclass" + 6 integers.
<DIV></DIV>>
<DIV></DIV>>- the line that prints the output should have "count" somewhere,
<DIV></DIV>>probably
<DIV></DIV>>you typed "cout" instead of "count".
<DIV></DIV>>
<DIV></DIV>>Note: you are learning C++ from a book that is a bit old ( I can
<DIV></DIV>>tell that
<DIV></DIV>>from the fact that you say "#include <IOSTREAM.H>", instead of
<DIV></DIV>>"#include
<DIV></DIV>><IOSTREAM>"): I suggest you find one that tells about ANSI C++. I do
<DIV></DIV>>not
<DIV></DIV>>know if there is one available on line, probably if you take a look
<DIV></DIV>>at the
<DIV></DIV>>link page of the site: http://www.noicys.d2g.com you can find some
<DIV></DIV>>sites
<DIV></DIV>>that among other books have one on ANSI C++.
<DIV></DIV>>
<DIV></DIV>
<DIV></DIV></div><br clear=all><hr>MSN Photos is the easiest way to share and print your photos: <a href='http://go.msn.com/bql/hmtag3_etl_EN.asp'>Click Here</a><br></html>
|