1. If you not are familiar with pointers in the C++ language i would recommend you go through some tutorials about them and play around with them(program with them) before you move on to step two.
2**** you were saying you are using Cheat Engine as your memory scanner. I would recommend that you go to youtube and search for "Cheat Engine 5.5 Tutorial 1/9 - Introduction" and watch all of the 9 tutorials and especially the tutorials about pointers.
3.Now it is time for you to find your pointer to the memory item you want to modify in memory
4. When you have done this you should check out the ReadProcessMemory and WriteProcessMemory classes, since you wanted to this from an external application(A console application in your case).
5.Put all of this to use:
Some code:
I take for granted that you know about functions and classes and the basic types available in c++.
//To read and write process memory you will need a handle to the process you want to modify. To get this do the following.
Code:
#include <windows.h>//Needed for some classes and structures we will use
HANDLE Process = 0;
unsigned long ProcessId = 0;
GetWindowThreadProcessId(FindWindowA(NULL,"Insert the window-name of the application you want a handle to"),&ProcessId);//It basically finds the window you looking for and from there on gets the Process-Id and stores that in the variable ProcessId.
//Note i will not include error checking
Process = OpenProcess(PROCESS_VM_OPERATION |PROCESS_VM_READ|PROCESS_VM_WRITE,true,ProcessId);//Basicly makes the HANDLE Process hold a reference to the process you want to access, with the privileges that we first applied.
//I will let the pointer handling part for you
//When you have the address you want to write to do the following
unsigned long YourAdress = Youradress here;
int YourValue = The value you want to write here;//You can replace this with a char or whatever you feel like
WriteProcessMemory(Process,(LPVOID)YourAdress,&YourValue,(DWORD)sizeof(YourValue),0);//Writes the value YourValue to the adress YourAdress in the process memory of Process.