Run C++ in command prompt - Windows

前端 未结 11 1627
逝去的感伤
逝去的感伤 2020-12-22 19:02

I know that everyone uses an IDE nowadays, but I just find it simpler to write my code in notepad++, compile it using a command prompt command, and run it from there too. At

11条回答
  •  萌比男神i
    2020-12-22 19:32

    A better alternative to MinGW is bash for powershell. You can install bash for Windows 10 using the steps given here

    After you've installed bash, all you've got to do is run the bash command on your terminal.

    PS F:\cpp> bash
    user@HP:/mnt/f/cpp$ g++ program.cpp -o program
    user@HP:/mnt/f/cpp$ ./program
    

提交回复
热议问题