Beginning C++ in FreeBSD
Sergey Zaharchenko
doublef at tele-kom.ru
Tue Apr 27 19:39:29 PDT 2004
On Tue, Apr 27, 2004 at 10:15:48PM +0200,
Dag-Erling SmЬrgrav probably wrote:
> 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.
The fact that I forgot it doesn't mean what I'm trying to show you isn't
true; add it and see what happens (you can also add -static to the
cmdline).
>
> > A quick hint: Turing has nothing to do with all this...
>
> Yes, he does; you just don't understand him.
>
If the thesis sounds like
> Any algorithm that can be written in one Turing-complete language can
> be written in another Turing-complete language.
then I think I understand it.
In the functional way (`what it can do') C is not different from C++, as
you all are pointing out (so I'm not trying to persuade you Turing was
wrong). It's different in what it allows you to inform the system (the
linker, for instance) about (and it will learn that *before* any actual
algorithm of yours is executed).
> DES
> --
> Dag-Erling Sm?rgrav - des at des.no
> _______________________________________________
> freebsd-chat at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-chat
> To unsubscribe, send any mail to "freebsd-chat-unsubscribe at freebsd.org"
>
--
DoubleF
Power corrupts. Powerpoint corrupts absolutely.
-- Vint Cerf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-chat/attachments/20040428/7c01609f/attachment.bin
More information about the freebsd-chat
mailing list