pointers

Posts 1–15 of 18 · Page 1 of 2
pointers
what good are they? How can they help me...
They are used to point. |:
Quote Originally Posted by Void View Post
They are used to point. |:
Well yeah, but how can they be beneficial...
Oh, sorry, it's 3:30 AM.. I can't think straight right now.
Quote Originally Posted by Void View Post
Oh, sorry, it's 3:30 AM.. I can't think straight right now.
I know what you mean... Earlier in the day I'm nice... then at night I can be a bit of a b****

Quote Originally Posted by Auxilium View Post
They are good for indirectly accessing things
which would be helpful how?
Quote Originally Posted by VvITylerIvV View Post
I know what you mean... Earlier in the day I'm nice... then at night I can be a bit of a b****


which would be helpful how?
They are just beneficial. Programming pretty much needs pointers. Just read more on it because i dont want to explain
Quote Originally Posted by Auxilium View Post


They are just beneficial. Programming pretty much needs pointers. Just read more on it because i dont want to explain
Well then don't explain, I've re-read the entire pointers section multiple times... I can't see how they would benefit me. I'll wait for somebody else to explain it to me. It's not that important at the moment so I don't really care. But thats why I asked it now, not when it would be important see I can halfthink while I'm halfasleep.
They are good for indirectly accessing things
Ill explain a few reasons.

1.Accessing class member data
2.Accessing data on the free store
3.Passing variables by reference to functions
Quote Originally Posted by Auxilium View Post
Ill explain a few reasons.

1.Accessing class member data
2.Accessing data on the free store
3.Passing variables by reference to functions
oh, thanks (just learning about classes... I guess you started learning a few days before me)
Quote Originally Posted by VvITylerIvV View Post
oh, thanks (just learning about classes... I guess you started learning a few days before me)
Whenn you learn about polymorphism, youll use them a lot more
You point at say, the game's HEALTH variable. You tell your program to change it to 100.

That's an example.
Quote Originally Posted by freedompeace View Post
You point at say, the game's HEALTH variable. You tell your program to change it to 100.

That's an example.
pointers are not necessarily used for hacking.. and its called pointer because in that case it is pointing to the memory address (ex: 0x0001337) which contains in it the value of health.

Pointer is just a way of getting access to memory without using the variable it self.. in programming a common way of using that is by changing a var value without actually using it, all this by using it's reference. (address)

edit:

a good example here:

[php]#include <iostream>

using namespace std;

void person(int *age) // *age is a pointer
{
*age = 20; //pointing to personAge
}

int main()
{

int personAge;

person(&personAge); //this is passing var reference

cout << personAge;

return 0;
}[/php]

output:

Code:
20
Quote Originally Posted by 'Bruno View Post
pointers are not necessarily used for hacking.. and its called pointer because in that case it is pointing to the memory address (ex: 0x0001337) which contains in it the value of health.

Pointer is just a way of getting access to memory without using the variable it self.. in programming a common way of using that is by changing a var value without actually using it, all this by using it's reference. (address)

edit:

a good example here:

[php]#include <iostream>

using namespace std;

void person(int *age) // *age is a pointer
{
*age = 20; //pointing to personAge
}

int main()
{

int personAge;

person(&personAge); //this is passing var reference

cout << personAge;

return 0;
}[/php]

output:

Code:
20
OK... so indirect access would be helpful when I am using a function and require the function to change the value of the variable?
Quote Originally Posted by VvITylerIvV View Post
OK... so indirect access would be helpful when I am using a function and require the function to change the value of the variable?
yea (e.g)... without needing to return (attention that arrays wont need it.. for the reason already talked about on the other topic)
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us