Normally we found text editor useful for taking note and side work but that is the only case for normal user. While for developer and CS Student text editor are used for coding and modifing source code. Developer text editor like Notepad++ (Windows), Vim (Linux), Gedit (Linux) and Sublime Text are leading text editor on different platform.
Leading in Windows Platform
Notepad++ is written in C++ and developed using C++ standard library and Win32 API call which make blazing fast on Windows platform compared to other text editor built on heavy libraries.
Notepad++ uses Scintilla library as it engine for Syntax Highlighting and other text editor funtionality.
Using Notepad++ as C++ Compiler
For using notepad++ as c++ compiler we will use MingGW compiler for compilation and send command to compiler using NppExec plugin.
- Download and install MingGW auto installer from here
- After installation of MingGW open C:/MingGW/bin/mingw-get.exe
- Then Select Basic Installtion from left side and check mingw32-gcc-g++ on right side
- Then click Installation -> Apply
- Then new windows will appear and click Apply again.
- Then wait until process complete.
- Now install NppExec in Notepad++
- Go to Plugins -> Plugin Manager – > Show Plugin Manager
- Select NppExec and click install.
- Now create new file and name it HelloWorld.cpp and write
1 2 3 4 5 6 7 8 9
#include #include int main() { std::cout << "Hello, World!\n"; system("pause"); return 0; }
- Then go to Plugin -> NppExec -> Execute
- Copy this in to text box
1 2 3
npp_save g++ "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" npp_run $(CURRENT_DIRECTORY)\$(NAME_PART).exe
- Result