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. Managed C++/CLI
  4. out parameters

out parameters

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++tutorialquestion
5 Posts 3 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.
  • A Offline
    A Offline
    a mulay
    wrote on last edited by
    #1

    How to specify out parameters in CLI/C++ like we do in C#? :confused:

    G G 2 Replies Last reply
    0
    • A a mulay

      How to specify out parameters in CLI/C++ like we do in C#? :confused:

      G Offline
      G Offline
      G Haranadh
      wrote on last edited by
      #2

      I expect there is no specifically out parameters and in parameters in c++. But for out parameters we should use the reference variable or pointer variable. Like we need to use call by ref concept.:)


      Nice talking to you. :-O
      If you judge people, you have no time to love them. -- Mother Teresa

      1 Reply Last reply
      0
      • A a mulay

        How to specify out parameters in CLI/C++ like we do in C#? :confused:

        G Offline
        G Offline
        George L Jackson
        wrote on last edited by
        #3

        To create an out-only parameter, you need to use the Out Attribute and a tracking reference: using namespace System; using namespace System::Runtime::InteropServices;   public ref class Foo { public: void Func([Out] String^% value) { value = "Hello"; } };

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        A G 2 Replies Last reply
        0
        • G George L Jackson

          To create an out-only parameter, you need to use the Out Attribute and a tracking reference: using namespace System; using namespace System::Runtime::InteropServices;   public ref class Foo { public: void Func([Out] String^% value) { value = "Hello"; } };

          "We make a living by what we get, we make a life by what we give." --Winston Churchill

          A Offline
          A Offline
          a mulay
          wrote on last edited by
          #4

          Thanks George! :)

          1 Reply Last reply
          0
          • G George L Jackson

            To create an out-only parameter, you need to use the Out Attribute and a tracking reference: using namespace System; using namespace System::Runtime::InteropServices;   public ref class Foo { public: void Func([Out] String^% value) { value = "Hello"; } };

            "We make a living by what we get, we make a life by what we give." --Winston Churchill

            G Offline
            G Offline
            G Haranadh
            wrote on last edited by
            #5

            Oh. Really Thanks.


            Nice talking to you. :-O
            If you judge people, you have no time to love them. -- Mother Teresa

            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