Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. calling c++ function from c.

calling c++ function from c.

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yoti11
    wrote on last edited by
    #1

    Hello, I've a program written in c and now I want to add functionality that already written in c++. Can I call c++ functions from c? Does anyone have article about it? Thank you.

    M 1 Reply Last reply
    0
    • Y yoti11

      Hello, I've a program written in c and now I want to add functionality that already written in c++. Can I call c++ functions from c? Does anyone have article about it? Thank you.

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      yoti11 wrote:

      Can I call c++ functions from c? Does anyone have article about it?

      Only if the export names are in "C" style. For example:

      // "sample.cpp"
      extern "C" void Hello(int nMyMoney);


      Maxwell Chen

      Y 1 Reply Last reply
      0
      • M Maxwell Chen

        yoti11 wrote:

        Can I call c++ functions from c? Does anyone have article about it?

        Only if the export names are in "C" style. For example:

        // "sample.cpp"
        extern "C" void Hello(int nMyMoney);


        Maxwell Chen

        Y Offline
        Y Offline
        yoti11
        wrote on last edited by
        #3

        Hi, Thank for your reply. I already use variables in c stale.

        D 1 Reply Last reply
        0
        • Y yoti11

          Hi, Thank for your reply. I already use variables in c stale.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          yoti11 wrote:

          I already use variables in c stale.

          :confused:


          "A good athlete is the result of a good and worthy opponent." - David Crow

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          L 1 Reply Last reply
          0
          • D David Crow

            yoti11 wrote:

            I already use variables in c stale.

            :confused:


            "A good athlete is the result of a good and worthy opponent." - David Crow

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            I see your :confused: and raise you :omg::wtf:

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups