Ben Laurie wrote:
> > rene.eberhard> It't also easy to use C++ objects in a C code.
> > 
> > Oh?  How so?  Is that portable?
> 
> Yes. But boring...
> 
> extern "C" {
> 
> void *newThing()
>       {
>       return new Thing;
>       }

That's how to use C in C++ code, not C++ in C code.
Feed the above to an ANSI C compiler (solaris) and it says
    $ cc -o foo foo.c
    "foo.c", line 2: syntax error before or at: "C"
    "foo.c", line 6: undefined symbol: new
    ...
    
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to