Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Pointers/addresses

Pointers/addresses

Posts 1–15 of 47 · Page 1 of 4
VvITylerIvV
VvITylerIvV
Pointers/addresses
Pointers

I read this and I kind of understand it...

You use ted = &var to say ted points to address of var

You use *ted to say value pointed by ted

You use * var to declare a pointer of the type that precedes it.


I don't understand the arrays part...

I use the code:[php]
char array[] = "hello there";
[/php]
and it works, so why wouldn't

[php]
array = "hello there";
[/php]
not be valid? I don't understand...
#1 · 16y ago
Auxilium
Auxilium
Because its an array. Char only holds 1 character
#2 · 16y ago
VvITylerIvV
VvITylerIvV
Quote Originally Posted by Koreans View Post
Because its an array. Char only holds 1 character
ok...

how bout
int numbers [20];
int * p;
int = p;

why would that not be valid... int holds up to 60k integers...
#3 · 16y ago
Auxilium
Auxilium
Quote Originally Posted by VvITylerIvV View Post
ok...

how bout
int numbers [20];
int * p;
int = p;

why would that not be valid... int holds up to 60k integers...
ints can hold a VALUE of around 65k.

And

[php]int = p;[/php]
is illegal. thats like saying int is p.
#4 · 16y ago
VvITylerIvV
VvITylerIvV
Quote Originally Posted by Koreans View Post


ints can have a VALUE of around 65k.

And

[php]int = p;[/php]
is illegal. thats like saying Int is p.

no, int = "p"; would be saying it is p

int = p is saying int = value of p...
#5 · 16y ago
Auxilium
Auxilium
Quote Originally Posted by VvITylerIvV View Post
no, int = "p"; would be saying it is p

int = p is saying int = value of p...
int is a variable type

you cant assign a value to it
#6 · edited 16y ago · 16y ago
Void
Void
Koreans speaks the truth. The compiler won't allow that, ever...
#7 · 16y ago
Auxilium
Auxilium
Here is a simple program that creates a pointer to an integer

[php]#include <iostream>
using namespace std;

int main()
{
int apple = 5;
int *pApple = &apple;

cout << *pApple << '\n';
return 0;
}



[/php]

Output:
Code:
5
Since pApple points to apple, when we [php]cout << *pApple;[/php] were really getting the value of apple

REMEMBER: Initialize a pointer to something or else youll have a wild pointer and can cause unwanted behavior. Even if youre not using it right away, initialize it to 0
#8 · 16y ago
VvITylerIvV
VvITylerIvV
Quote Originally Posted by Koreans View Post


int is a variable type

you cant assign a value to it
Quote Originally Posted by Void View Post
Koreans speaks the truth. The compiler won't allow that, ever...
Well, I was just trying to ask why can't I assign a value from a variable to an array.

Quote Originally Posted by Koreans View Post
Here is a simple program that creates a pointer to an integer

[php]#include <iostream>
using namespace std;

int main()
{
int apple = 5;
int *pApple = &apple;

cout << *pApple << '\n';
return 0;
}



[/php]

REMEMBER: Initialize a pointer to something or else youll have a wild pointer and can cause unwanted behavior. Even if youre not using it right away, initialize it to 0
I know how to use pointers, it was the array part that confused me... I don't understand it.
#9 · 16y ago
Void
Void
Quote Originally Posted by Koreans View Post
Here is a simple program that creates a pointer to an integer

[php]#include <iostream>
using namespace std;

int main()
{
int apple = 5;
int *pApple = &apple;

cout << *pApple << '\n';
return 0;
}



[/php]

Output:
Code:
5
Since pApple points to apple, when we [php]cout << *pApple;[/php] were really getting the value of apple

REMEMBER: Initialize a pointer to something or else youll have a wild pointer and can cause unwanted behavior. Even if youre not using it right away, initialize it to 0
Right, 'cause reading at address 0 definitely won't give you access violation errors.
#10 · 16y ago
Auxilium
Auxilium
Then why did you ask me why cant you do [php]int = p[/php]?

Quote Originally Posted by Void View Post
Right, 'cause reading at address 0 definitely won't give you access violation errors.
You re-assign it when youre going to use it
amiright /?
#11 · 16y ago
VvITylerIvV
VvITylerIvV
Quote Originally Posted by Koreans View Post
Then why did you ask me why cant you do [php]int = p[/php]?



You re-assign it when youre going to use it
because I didn't know how to explain my question then...
#12 · 16y ago
Void
Void
Quote Originally Posted by Koreans View Post
Then why did you ask me why cant you do [php]int = p[/php]?



You re-assign it when youre going to use it
amiright /?
Then just leave the default value wild and re-assign it later. Same results.. |:

Anyways, arrays are basically pointers..

[php]
int array[] = {1,2,3,4,5};
[/php]

To access the last integer in the array, you can either use the brackets ( arrays ).
[php]
cout << array[4];
[/php]

Or you can use pointers.

[php]
cout << *(array+4);
[/php]

Remember, the first element is always 0, so if you have 5, the last one is going to be 4. Incase you didn't already know.
#13 · 16y ago
Auxilium
Auxilium
Quote Originally Posted by Void View Post
Then just leave the default value wild and re-assign it later. Same results.. |:

Anyways, arrays are basically pointers..

[php]
int array[] = {1,2,3,4,5};
[/php]

To access the last integer in the array, you can either use the brackets ( arrays ).
[php]
cout << array[4];
[/php]

Or you can use pointers.

[php]
cout << *(array+4);
[/php]

Remember, the first element is always 0, so if you have 5, the last one is going to be 4. Incase you didn't already know.
I'm just restating what mah bewk said
#14 · 16y ago
VvITylerIvV
VvITylerIvV
Quote Originally Posted by Void View Post
Then just leave the default value wild and re-assign it later. Same results.. |:

Anyways, arrays are basically pointers..

[php]
int array[] = {1,2,3,4,5};
[/php]

To access the last integer in the array, you can either use the brackets ( arrays ).
[php]
cout << array[4];
[/php]

Or you can use pointers.

[php]
cout << *(array+4);
[/php]

Remember, the first element is always 0, so if you have 5, the last one is going to be 4. Incase you didn't already know.
Ok, so in this case...


[php]
array [3]
[/php]

points to the address of array [3], doesn't actually hold a value?
#15 · 16y ago
Posts 1–15 of 47 · Page 1 of 4

Post a Reply

Similar Threads

  • Finding static pointer address? C++By scriptkiddy in C++/C Programming
    0Last post 16y ago
  • [Help]Pointer AddressBy 258456 in C++/C Programming
    6Last post 16y ago
  • The Enemy Player Pointer AddressBy NOOB in Combat Arms Hack Coding / Programming / Source Code
    39Last post 15y ago
  • Kurwa Need A Weapon Pointer Work Address!By yogilek in WarRock - International Hacks
    3Last post 19y ago
  • no fall damage addresse and pointer or valueBy 123456789987654321 in WarRock - International Hacks
    2Last post 19y ago

Tags for this Thread

None