Re: Beginning C++ in FreeBSD

[ Available lists | Index of freebsd-chat | Month of Apr 2004 | Week of 27 Apr 2004 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Sergey Zaharchenko <doublef@tele-kom.ru>
Date
27 Apr 2004 19:39:29
Subject
Re: Beginning C++ in FreeBSD
Message-ID
20040428023920.GA382@Shark.localdomain


[ Hide this part ]
On Tue, Apr 27, 2004 at 10:15:48PM +0200,
Dag-Erling Smrgrav probably wrote:
> Sergey Zaharchenko <doublef@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@des.no
> _______________________________________________
> freebsd-chat@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-chat
> To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org"
>

--
DoubleF
Power corrupts. Powerpoint corrupts absolutely.
-- Vint Cerf


[ Show this part (application/pgp-signature) ]

Elapsed time: 0.152 seconds