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