| View previous topic :: View next topic |
| Author |
Message |
haha01haha01 Grandmaster Cheater Supreme
Reputation: 0
Joined: 15 Jun 2007 Posts: 1233 Location: http://www.SaviourFagFails.com/
|
Posted: Sat Mar 22, 2008 7:18 am Post subject: [Question] Pointers |
|
|
some1 know how to use pointers in delphi \ c \ vb?
i mean like for example i have 2 variables:
asdf: string;
qwer: string;
asdf := 'qwer'
qwer := 'lol'
now i need to use asdf as a pointer, and get the data stored inside qwer.
i know u can do it in ASM, iunno how to do it in other compilers.
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Mar 22, 2008 7:21 am Post subject: Re: [Question] Pointers |
|
|
| haha01haha01 wrote: | some1 know how to use pointers in delphi \ c \ vb?
i mean like for example i have 2 variables:
asdf: string;
qwer: string;
asdf := 'qwer'
qwer := 'lol'
now i need to use asdf as a pointer, and get the data stored inside qwer.
i know u can do it in ASM, iunno how to do it in other compilers. |
Delphi, I'm pretty sure it's
| Code: |
qwer : string;
asdf : ^string;
asdf := @string;
|
or something like that.
For C,
| Code: |
int hallo = 0;
int *hello = &hallo;
|
As for VB, I've got no clue.
A simple Gewgle search could quite probably yield the answer. =P
_________________
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sat Mar 22, 2008 11:01 am Post subject: |
|
|
| AddressOfasdf := @asdf;
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
|
Posted: Sat Mar 22, 2008 2:14 pm Post subject: |
|
|
In VB6 you can use VarPtr, StrPtr, and CopyMemory to accomplish this.
_________________
- Retired. |
|
| Back to top |
|
 |
haha01haha01 Grandmaster Cheater Supreme
Reputation: 0
Joined: 15 Jun 2007 Posts: 1233 Location: http://www.SaviourFagFails.com/
|
|
| Back to top |
|
 |
|