Let's say for example there's a game running on my PC; How could I access data from it, for exampe if the stickman I control in the game dies my c++ application detects it and for example writes "dead" in the console. I know this sounds stupid, but I just can't phrase this better. Thanks everyone in advance!
I'm not sure but it is possible if your game code sends a command line argument to the operating system and your c++ code can get that from OS and act accordingly. Another way to go around might include having a thread along with game for the sole purpose of transferring info from game to your c++ code.
Sorry I don't have much info but its not so easy.