please wait

  • Atul Kasana Mar-14-2019 01:34:14 PM ( 2 months ago )


    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 least that works for Java and Python. I've tried to get my head around how to do that with C++, and haven't been able to find anything good. Is there any compiler (like Java's JDK) that I can stick into my path and use the C++ equivalent of javac and java to run and compile my code from CMD?

    Note: please don't post answers and comments about how IDEs are better - I know they are. I'm just used to doing it the old way :D

  • Deepak Parmar Mar-14-2019 01:35:26 PM ( 2 months ago )

    It depends on what compiler you're using.

    For example, if you are using Visual C++ .NET 2010 Express, run Visual C++ 2010 Express Command Prompt from the start menu, and you can simply compile and run the code.

    > cl /EHsc mycode.cpp
    > mycode.exe

    or from the regular command line, you can run vcvars32.bat first to set up the environment. Alternatively search for setvcvars.cmd (part of a FLOSS project) and use that to even locate the installed VS and have it call vcvars32.bat for you.

    Please check your compiler's manual for command lines.

Please login

Similar Discussion

Recommended For You