
Originally Posted by
RoPMadM
In some cases the compiler gets confused and generates undefined instructions.
As I said just in some cases, but to prevent this just type manually.
I managed it by using a makro key on my keyboard to type std:: instantly.

Originally Posted by
WasserEsser
The using directive is fine when used in a translation unit, it's bad just when used in header files. And, if I want to do this:
Code:
#include <iostream>
#include <windows.h>
int main()
{
using namespace std;
cout << "Black Ops 3 must be open for this tool to work!" << endl;
system("Pause");
HWND hwnd = FindWindow(0, "Call of Duty® - ship - Microsoft Office");
if(hwnd == 0)
{
cout << "Black Ops 3 has not been detected as opened yet" << endl;
system("Pause");
}
else
{
DWORD proccess_ID;
GetWindowThreadProcessId(hwnd, &proccess_ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proccess_ID);
cout << "Black Ops 3 has successfully been detected!" << endl;
cout << "Type :";
int Option;
cin >> Option;
if (Option == 1)
{
cout << "Please enter your desired cash..." << endl;
cout << "Type :";
int Points;
cin >> Points;
DWORD newdatasize = sizeof(Points);
if (WriteProcessMemory(hProcess, (LPVOID)0x80A9CE4, &Points, newdatasize, NULL))
{
cout << "Your pills has been successfully written and added to the game, enjoy!" << endl;
system("Pause");
}
else
{
cout << "Nope";
}
}
}
}
it's also good, because I'm using it just in that function's scope.