Beginning C++ in FreeBSD

Dag-Erling Smørgrav des at des.no
Tue Apr 27 05:41:43 PDT 2004


Sergey Zaharchenko <doublef at tele-kom.ru> writes:
> // Turing strikes again:)
> // Ok. Write this (to be compiled as a shared object) in portable C:
>
> #include <iostream>
>
> class A
> {
> public:
> 	A();
> };
>
> A::A()
> {
> 	cout<<"This shared library was loaded!"<<endl;
> }
>
> static A a;

Sure:

void a(void)
{
        cout = endl = 0;
}

the error message won't be *exactly* the same, but pretty close
(different line numbers, and "In function `a'" instead of "In
constructor `A::A()'")

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


More information about the freebsd-chat mailing list