"pointers" in /clr
- From: "Peter Oliphant" <poliphant@xxxxxxxxxxxxxxxx>
- Date: Tue, 15 Nov 2005 07:54:04 -0800
In the 'old days', we could create a pointer to an instance of a variable
like so:
int i = 58 ;
int* i_ptr = &i ;
int j = *i_ptr ; // j = 58
Now, in /clr how do we do the same? That is, if I replace '*' with '^' what
do I replace '&' with to generate a 'pointer' (is 'x^' called a 'reference'
per chance?) to the instance? That is:
ref class myClass() {...} ;
myClass i ;
myClass^ i_ptr = &i ; // error, use what instead of '&'?
myClass j = *i_ptr ; // error (i think), do what instead?
[==P==]
.
- Follow-Ups:
- Re: "pointers" in /clr
- From: Holger Grund
- Re: "pointers" in /clr
- From: Nishant Sivakumar
- Re: "pointers" in /clr
- Prev by Date: Windows Forms Control Library project
- Next by Date: enums, 2005, and the debugger
- Previous by thread: Windows Forms Control Library project
- Next by thread: Re: "pointers" in /clr
- Index(es):
Loading