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 › C++ Trainer Skeleton

C++ Trainer Skeleton

Posts 1–15 of 41 · Page 1 of 3
Dave84311
[MPGH]Dave84311
C++ Trainer Skeleton
Probably one of the simplest skeletons I've got:

Code:
#include <windows.h>
#include <stdio.h>

int main(){

  HANDLE hProcess = 0;

  HWND hWindow;
  DWORD pid = 0;

  hWindow = FindWindow(NULL, "Window Name");
  if (hWindow){
     GetWindowThreadProcessId(hWindow, &pid);
  }

  hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);

  if(hProcess != NULL)
     printf("Process Found!");
  else {
     printf("Process Not Found!");
     return 0;
  }
 
  //Writes byte values to 0x00567...
  BYTE valueToWrite[] ={0x90, 0x90};
  WriteProcessMemory(hProcess, (void*)0x00567A8F, (void*)&valueToWrite, sizeof(valueToWrite), NULL);

  return 0;
}
Its really handy if you want to make your own trainer. You of course need to know how to use it
#1 · 20y ago
Firey
Firey
this isn't c++ is just "C"
#2 · 20y ago
arunforce
[MPGH]arunforce
ROFL. Just ROFL.
#3 · 20y ago
RebornAce
RebornAce
ROFLCOPTER DOWN. dontcha mean? :P
#4 · 20y ago
Dave84311
[MPGH]Dave84311
Quote Originally Posted by Firey
this isn't c++ is just "C"
It is C++.
#5 · 20y ago
Firey
Firey
c++ = cout << "";
c = printf ""
#6 · 20y ago
arunforce
[MPGH]arunforce
If, I remember correctly, with my limited knowledege of C++, printf is useable in C++ and C#.

Dave kept trying to make me use printf instead of std::cout << ""
#7 · 20y ago
Firey
Firey
well, you can code C in V C++ but its just like javascript, HTML and Javascript can be coded together.

Any c++ tutorial uses cout <<
any c tutuorial uses printf
#8 · 20y ago
arunforce
[MPGH]arunforce
Yeah, but the headers use the C++ format.

Maybe its a hybrid C#+!
#9 · 20y ago
SH
shercipher
I hate to break it to you, that is typical C. But not because of the reason he provided, because you can use printf() in both C and C++.

But there is nothing C++ specific in there; no references, classes, object orientation, or instantiation. In other words, it is C, because you can plug this code into an ANSI C compiler and it would still run.

And C# has nothing to do with this; in fact that is incorrect C# syntax.

EDIT: And by the way, both C and C++ use the same header include system.
This is a telltale sign of C:

#include <stdio.h>

This is a telltale sign of C++:

#include <iostream> //note there is no .h
using namespace ...; //C does not use namespaces
#10 · 20y ago
Dave84311
[MPGH]Dave84311
I added that... "printf();" bit. It was originally a large chunk of code stripped down. C, works with C++ because they are esentially the same thing. One is just a little more complicated.

Anyways, the bit about the header files isn't completely correct. Unless its a "compiler included header" it can't be used without the .h at the end. Anyways its good programming to include a .h at the end of every header
#11 · 20y ago
SH
shercipher
Actually, according to the latest C++ standard, you are supposed to leave out .h on STD libraries. The reason is because those with .h are being deprecated.

If you doubt me, go into Code::Blocks and type in a simple application with <iostream.h> and it will give you a deprecation warning.

ie...

#include <iostream>
using namespace std;
int main() {
cout<<"hi!\n";
return 0;
} //no deprecation warning

#include <iostream.h>
int main() {
cout<<"hi!\n";
return 0;
} //deprecation warning
#12 · 20y ago
Dave84311
[MPGH]Dave84311
I'm using VS 2003 and I never get deprecation warnings for that.
#13 · 20y ago
CL
clone
Thanks 4 replying.
i'm software eng., i'm a student.
so i would like to know more about programming, i mean to build a system. my projet last year is on xml, and file maker pro. ca u help me out???
#14 · 20y ago
arunforce
[MPGH]arunforce
It's heating up in here, I am a C++ dropout!
#15 · 20y ago
Posts 1–15 of 41 · Page 1 of 3

Post a Reply

Similar Threads

  • MPGH Warrock Trainer v1.010206By Dave84311 in WarRock - International Hacks
    21Last post 20y ago
  • (SEARCHING)WarRock TrainerBy User Namem in Hack Requests
    11Last post 20y ago
  • Neopets - NeoQuest II TrainerBy sockopen in Visual Basic Programming
    12Last post 19y ago
  • Trainer?By outrage20 in Gate To Heaven Hacks
    1Last post 20y ago
  • The Warrock TrainerBy tomvernons in WarRock - International Hacks
    4Last post 20y ago

Tags for this Thread

None