There are two main ways for you, assuming (as the question indicates)
that you don't want to have your C++ program running elevated.
First, you can create a shortcut that provides elevation. That's all you
need directly, but for completeness I mention that you can use that to
provide a batch file "run elevated" command, to some degree like
Unix-land "sudo". In order to run a shortcut via the C++ `system`
function, I think you can just specify its full name, with ".lnk"
filename extension. For some inexplicable reason the ".lnk" extension is
not in the PATHEXT list, which means that by default you cannot omit the
extension.
Second, from the C++ code you can use the Windows API function
ShellExecute, with "runas" argument.
There is also a third way to run code elevated, which is a bit advanced,
namely using a COM interface that's used by ShellExecute internally.
But I'd go for the simple shortcut, which as it happens is a
programming-language-agnostic solution.
Cheers & hth.,
- Alf
PS: A question like this is much better asked in a Windows-specific
group, at least wrt. the goal of keeping the groups clean & useful.
There is a little bit of C++ relevance in the question, e.g. it mentions
C++. But mostly and primarily this is about Windows, independent of
programming language, i.e. OFF TOPIC in this group.