Beginning C++ in FreeBSD

Dag-Erling Smørgrav des at des.no
Tue Apr 27 13:15:58 PDT 2004


Sergey Zaharchenko <doublef at tele-kom.ru> writes:
> Sorry? I mean, you've got the object file, and can compile a shared
> library which will advertize itself, with the former, whereas the
> latter, as you've pointed out, doesn't compile.

neither does the former, with a proper compiler:

% g++ -o /dev/null -c a.cc
a.cc: In constructor `A::A()':
a.cc:11: error: `cout' undeclared (first use this function)
a.cc:11: error: (Each undeclared identifier is reported only once for each
   function it appears in.)
a.cc:11: error: `endl' undeclared (first use this function)

you're missing "using namespace std;" at the top.

> A quick hint: Turing has nothing to do with all this...

Yes, he does; you just don't understand him.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-chat mailing list