hey so i wanted to get name of the exe that is currently running here is what ive tried doing
#include <iostream> #include <windows.h> using namespace std; int main() { char filename[ MAX_PATH ]; DWORD size = GetModuleFileNameA( NULL, filename); if (size) cout << "EXE file name is: " << filename << "\n"; else cout << "Could not fine EXE file name.\n"; return 0; } but it gets the path of the exe too but i only need the exe name any help?
/