Yes you can perform this by adding a manifest file for your application and embed it to your application while compilation. You can perform following steps for doing this.
1. Create a file having name "<<application name>>.exe.manifest" in the same folder where project file is present.
2. Write below provided lines in it
="1.0"="utf-8"
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"
xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="ApplicationName"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>
3. Make sure that in place of Application name, provide your executable name in above XML.
4. Now go to "Project Properties->Configuration Property->Linker->Manifest File".
5. Change "UAC Execution Level" to "requireAdministrator".
6. After this go to "Project Properties->Configuration Property->Manifest Tool->Input and Output".
7. Add yo9ur manifest name in "Additional Manifest Files" text box.
8. Now compile the application and generate executable.
9 Now when you will run this application, it will require admin privileges.
Please find more details for creating and embedding a manifest file at
link[
^]