How to write a console application that uses powershell instead of cmd-Collection of common programming errors
I have no idea if this is even a programming question, or something that is configured through my OS. But how would I get it so my console application uses Powershell instead of cmd? I know I can open Powershell and run the program from there, but even then, calls such as system("Get-Childitem") fail.
I’m using Visual C++ by the way, if that matters. But if it’s a compiler specific thing, then I would also like to know how to do it with GCC.