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. "ref" equivalent keyword in C++

"ref" equivalent keyword in C++

Scheduled Pinned Locked Moved C / C++ / MFC
csharphelpc++jsonquestion
2 Posts 2 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.
  • K Offline
    K Offline
    kd8341
    wrote on last edited by
    #1

    I am using VC++.net 2003 to access matlab with C API, I have to call a function which is programmed in C#. It looks like VC++.net doesn't like "ref" keyword. >>>>>>>>>>> r = ma.GetMatrix(matname, ref a); /// <--- source code from C# <<<<<<<<<<< "ref" works well in C#, but when I call this function ("GetMatrix") in managed C++, I got an compilation error: >>>>>>>>>>> "cannot covert parameter 2 from 'double __gc[,]' to 'double (__gc *) __gc[,]' <<<<<<<<<<< I am new to VSS.net, could anybody kindly help me if there is "ref" equivalent keyword in C++? Many thanks!

    T 1 Reply Last reply
    0
    • K kd8341

      I am using VC++.net 2003 to access matlab with C API, I have to call a function which is programmed in C#. It looks like VC++.net doesn't like "ref" keyword. >>>>>>>>>>> r = ma.GetMatrix(matname, ref a); /// <--- source code from C# <<<<<<<<<<< "ref" works well in C#, but when I call this function ("GetMatrix") in managed C++, I got an compilation error: >>>>>>>>>>> "cannot covert parameter 2 from 'double __gc[,]' to 'double (__gc *) __gc[,]' <<<<<<<<<<< I am new to VSS.net, could anybody kindly help me if there is "ref" equivalent keyword in C++? Many thanks!

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      hope this '&' will help


      [Vote One Here, Complete my Survey....] Alok Gupta
      visit me at http://www.thisisalok.tk          "I Think Believe this Will Help"

      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