www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/02/02:21:33

From: Brendan Simon <brendan AT rdt DOT monash DOT edu DOT au>
Date: Fri, 2 Feb 1996 16:55:51 +1100
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: calling C++ from C

I am new to C++ but experienced with C and soley use djgpp v2.

I have a simple C++ program which I intend to use as a library.

Can I call/use a C++ class from within a C program ?

If not, can I have a wrapper style function in the C++ program which will
use the class objects ?

As I understand it, I would also need 'extern "C" {' and '}' in the C++ file.
Is this correct ??

Thanks for your help.

Brendan Simon
brendan AT rdt DOT monash DOT edu DOT au

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019