It sounds like the program runs fine on your development machine (Windows 8.1 + MSVS 2015), but doesn't run on an XP machine.
SOLUTION: you must include the MSVC runtime along with your .exe.
Look here: Deploying Native Desktop Applications (Visual C++)
and here: Visual C++ Redistributable for Visual Studio 2015.
Update from Chuck Walbourn -
Note that in the particular case of VS 2015 Update 3 and VS 2017, you
can use the VS 2017 or 2019 REDIST and it will work fine. See:
- VC Runtime in MSVC 2017 is binary compatible with
2015
and
- Microsoft Docs: C++ binary compatibility between Visual Studio
2015, 2017, and
2019.
And to repeat - your "setup" should include a compatible MSVC runtime (aka "VCRedist").