Search code examples
c++compilationnotepad

Can I make a C++ program in Notepad then compile and run it in Command Prompt?


How would I do this if it is possible? Would it work the same way with Notepad++?


Solution

  • Well, you would need a compiler of some sort. C++ source code won't just run, you need to turn it into an executable file.

    And, yes, you can easily do this. If you download MinGW (minimalist GNU for Windows), you can compile source code from the command line just fine, using any editor you want to create the source files.

    But it's possibly not something I'd inflict on a beginner, you may want to look in to the Microsoft Visual Studio Express editions since they give you an IDE which makes you life easier, unless you're a crusty old coder like me who still likes using punched cards :-).