I've been looking for a way to open a program using a C++ application. I'm trying to make a program which launches two programs together, for example I want to launch a game with AutoHotkey and when the game closes AutoHotkey does too.
I can't seem to find a simple answer online, I've read posts of people saying to use system() but others say not to use that because it's resource heavy which isn't something I want.
What other ways could I use to launch a program? I'm fairly new to C++ I've been using it for about a month now so I'm not very experienced at all. I know there is a way in C# to launch a program something like: Process.Start("notepad.exe").
As many different way to this would be awesome to know, thanks in advance guys.