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. passing dynamic array by reference

passing dynamic array by reference

Scheduled Pinned Locked Moved Managed C++/CLI
data-structureshelpquestion
4 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.
  • S Offline
    S Offline
    Shamnar
    wrote on last edited by
    #1

    sir i wanna pass an array to a fn by refrence.. The array should be allocated dynamically.. how can i it.. Can any one help me.. reply will be highly appreciated. pls send me prototype of fn, calling fn etc. with simple eg:confused: Thanx in advance..

    shamnar

    C A L 3 Replies Last reply
    0
    • S Shamnar

      sir i wanna pass an array to a fn by refrence.. The array should be allocated dynamically.. how can i it.. Can any one help me.. reply will be highly appreciated. pls send me prototype of fn, calling fn etc. with simple eg:confused: Thanx in advance..

      shamnar

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You're wanting to pass a managed array ? I thought that array being a class, it would have been by reference by default. Or did you mean the C++ forum ?

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      1 Reply Last reply
      0
      • S Shamnar

        sir i wanna pass an array to a fn by refrence.. The array should be allocated dynamically.. how can i it.. Can any one help me.. reply will be highly appreciated. pls send me prototype of fn, calling fn etc. with simple eg:confused: Thanx in advance..

        shamnar

        A Offline
        A Offline
        amaneet
        wrote on last edited by
        #3

        Do u know something about link list?:suss:

        1 Reply Last reply
        0
        • S Shamnar

          sir i wanna pass an array to a fn by refrence.. The array should be allocated dynamically.. how can i it.. Can any one help me.. reply will be highly appreciated. pls send me prototype of fn, calling fn etc. with simple eg:confused: Thanx in advance..

          shamnar

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Are you talking about a managed array? Managed arrays are a reference type so it would pass in a reference to that array.

          static int Sqrt(int x) { if (x<0) throw new ArgumentOutOfRangeException(); int temp, y=0, b=0x8000, bshft=15, v=x; do { if (v>=(temp=(y<<1)+b<>=1)>0); return y; :omg:

          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