home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!umn.edu!myria.cs.umn.edu!hansen
- From: hansen@myria.cs.umn.edu (David Hansen)
- Subject: Re: How to call C++ functions in a C program?
- Message-ID: <1992Dec18.145149.16160@news2.cis.umn.edu>
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: myria.cs.umn.edu
- Organization: University of Minnesota
- References: <1gqbepINNt6s@function.mps.ohio-state.edu> <SCHOUTEN.92Dec17125550@sp95.csrd.uiuc.edu>
- Date: Fri, 18 Dec 1992 14:51:49 GMT
- Lines: 18
-
- In article <SCHOUTEN.92Dec17125550@sp95.csrd.uiuc.edu>, schouten@sp95.csrd.uiuc.edu (Dale Schouten) writes:
- |>
- |> I'm not sure how standard it is, but with at least some compilers
- [..]
- |> extern "C" {
- |> int Cplusplus_function(int,char *);
- |> }
- |>
-
- Pretty standard. See the ARM, sections 7.4 and 7.1c. In the above example,
- you could also use the form:
-
- extern "C" int Cplusplus_function(int i_parm, char * p_parm)
- {
- // C++ code to implement function
- }
-
- -=Dave
-