Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help] Making tutorial for CE (pointers...)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
DevilGilad
Grandmaster Cheater
Reputation: 0

Joined: 10 May 2007
Posts: 624
Location: Delete C:\WINDOWS folder and you'll be able to see me.

PostPosted: Mon Jun 25, 2007 10:40 am    Post subject: [Help] Making tutorial for CE (pointers...) Reply with quote

As the title says, I have a problem...
I want to make a button that will change the pointer of a value, and I don't
know how to do it... Can someone explain it to me...?

Thx :]

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Simsgy
Grandmaster Cheater
Reputation: 0

Joined: 07 May 2007
Posts: 581
Location: My new avatar <3

PostPosted: Mon Jun 25, 2007 12:43 pm    Post subject: Reply with quote

You mean change the value of a pointer or add flags?
Because I don't think you can change a address's pointer 0.o

_________________

Designer, WebMaster and a Delphi programmer.
TrPlayer, my biggest Delphi project hosted on SourceForge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
DevilGilad
Grandmaster Cheater
Reputation: 0

Joined: 10 May 2007
Posts: 624
Location: Delete C:\WINDOWS folder and you'll be able to see me.

PostPosted: Mon Jun 25, 2007 12:56 pm    Post subject: Reply with quote

Simsgy wrote:
You mean change the value of a pointer or add flags?
Because I don't think you can change a address's pointer 0.o

Dark Byte did it on his tutorial :/
Everything can be...

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
SkatSkat
Grandmaster Cheater
Reputation: 0

Joined: 30 Oct 2006
Posts: 648

PostPosted: Mon Jun 25, 2007 1:12 pm    Post subject: Reply with quote

lol why are you making a tutorial on it if you have to ask us Razz
_________________
"We're betting everything on ourselves tonight" - The Bouncing Souls
Back to top
View user's profile Send private message AIM Address
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Jun 25, 2007 5:02 pm    Post subject: Reply with quote

So he knows how when he writes the tutorial.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Mon Jun 25, 2007 5:36 pm    Post subject: Reply with quote

Do you mean something like this? (Multi-level pointers)

Code:
#include <stdio.h>

int main(int argc, const char* argv[])
{
   int number=1, blank=0; char answer;
   int * p_one = &number, * p_two = &blank;
   int ** pp_one = &p_one;

   printf("Do you want to be amazed? (Y/N) ");
   scanf("%s", &answer);

   if(answer == 'Y')
   {
      p_two = &number;
      p_one = &blank;
      pp_one = &p_two;
      puts("Woah, didn't see that coming.");

   }
   else if(answer == 'N')
      puts("Go away.");
   else
      puts("Y or N, pick one next time.");

   return 0;
}
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25813
Location: The netherlands

PostPosted: Mon Jun 25, 2007 7:27 pm    Post subject: Reply with quote

I use them inside records (structs)
record 1 has a element that points to record 2, record2 has a element that points to record 3, etc...
and allocate the structures at runtime and trhen set the address of the record in the previous structure

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Mon Jun 25, 2007 10:21 pm    Post subject: Reply with quote

You can do something like this:
On FormCreate, lets say, add this (pMyPointer is a global PInt16, pOtherPointer is a pointer):
Code:

GetMem(pMyPointer,SizeOf(Integer));
GetMem(pOtherPointer,SizeOf(Pointer));
pOtherPointer := @pMyPointer;
pMyPointer^ := 100; //Just an example


And when the user clicks a button:
Code:

var
pTemp  :  PInt16;
begin
GetMem(pTemp, SizeOf(Integer) );
pTemp^ := pMyPointer^;
FreeMem(pMyPointer);
pMyPointer := pTemp;
end;


Just an example
Back to top
View user's profile Send private message
DevilGilad
Grandmaster Cheater
Reputation: 0

Joined: 10 May 2007
Posts: 624
Location: Delete C:\WINDOWS folder and you'll be able to see me.

PostPosted: Tue Jun 26, 2007 5:03 am    Post subject: Reply with quote

Flyte wrote:
Do you mean something like this? (Multi-level pointers)

Code:
#include <stdio.h>

int main(int argc, const char* argv[])
{
   int number=1, blank=0; char answer;
   int * p_one = &number, * p_two = &blank;
   int ** pp_one = &p_one;

   printf("Do you want to be amazed? (Y/N) ");
   scanf("%s", &answer);

   if(answer == 'Y')
   {
      p_two = &number;
      p_one = &blank;
      pp_one = &p_two;
      puts("Woah, didn't see that coming.");

   }
   else if(answer == 'N')
      puts("Go away.");
   else
      puts("Y or N, pick one next time.");

   return 0;
}

Uhh... I want it on Delphi, man...
Not C++...

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue Jun 26, 2007 5:21 am    Post subject: Reply with quote

its C,not C++.
Back to top
View user's profile Send private message
DevilGilad
Grandmaster Cheater
Reputation: 0

Joined: 10 May 2007
Posts: 624
Location: Delete C:\WINDOWS folder and you'll be able to see me.

PostPosted: Tue Jun 26, 2007 6:35 am    Post subject: Reply with quote

Kaspersky wrote:
its C,not C++.

I don't know the difference between them, sorry ~_~
I don't know any of them...

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Tue Jun 26, 2007 9:33 am    Post subject: Reply with quote

DevilGilad wrote:
Uhh... I want it on Delphi, man...
Not C++...


Variables:
Code:
number : integer;
blank : integer;
p_one : ^integer;
p_two : ^integer;


Before Button is Clicked:
Code:
number := 1;
blank := 0;
p_one := @number;
p_two := @blank;


After Button is Clicked:
Code:
p_one := @blank;
p_two := @number;


Forgive the crappy coding. I pretty much just taught myself Delphi in about 5 seconds to answer your question.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites