[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: g++-3.0 problem (with include files?)




On 13 Feb 2002, J.H.M. Dassen (Ray) wrote:

> On Wed, Feb 13, 2002 at 10:31:13 +0100, Anders Lennartsson wrote:
> > But with g++3.0 it reports some errors. If I run with -v it displays all
> > the paths compiled in, which do seem ok. Why doesn't it find the correct
> > location of the include files (which I believe is the problem)?
>
> That is not the problem. Your code does not comply with the current C++
> standard. See
> http://www.parashift.com/c++-faq-lite/coding-standards.html#[25.4]
> for details and add "using namespace std;" after the #include-s to get it to
> compile.

Better is (in my opinion)

using std::cout;

etc. This one makes available the functions etc. you are actually using.
And get yourself a good, basic, up to date (ie. standards compliant) C++
book. I recommend either (or both) "Accelerated C++" or "C++ Primer". You
can also easily find out much more on this topic on any C++ newsgroup like
comp.lang.c++.

                                Sincerely, Faheem Mitha.



Reply to: