home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 18128 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  853 b 

  1. Path: sparky!uunet!caen!zaphod.mps.ohio-state.edu!not-for-mail
  2. From: ren@function.mps.ohio-state.edu (Liming Ren)
  3. Newsgroups: comp.lang.c++
  4. Subject: How to call C++ functions in a C program?
  5. Date: 17 Dec 1992 11:55:53 -0500
  6. Organization: Department of Mathematics, The Ohio State University
  7. Lines: 16
  8. Distribution: world
  9. Message-ID: <1gqbepINNt6s@function.mps.ohio-state.edu>
  10. NNTP-Posting-Host: function.mps.ohio-state.edu
  11.  
  12. Hi , Merry chrismas , everybody!
  13.  
  14. I hope this queston makes sense.
  15.  
  16. I know we can call C functions inside a C++ program. Is there a way to
  17. call a C++ function inside a C program? I tried to link  a C program with 
  18. a C++ function as follows:
  19.  
  20. cc f.o g.c
  21.  
  22. Where f.o has a very simple C++ function inside and g.c is a simple C
  23. program calling the function inside f.o. It dose not WORK!
  24.  
  25. How to do this ? Please help!
  26.  
  27. Many  thanks!
  28.