+17

How do you run a code in Notepad++ ?

57 Answers

New Answer

+19

make a batch file -file.bat in that file enter the command you want to run For c++ -g++ main.cpp For python -python main.py etc.

+17

Read through the discussions, some peeps talks bout pressing F5 or sumert. It's 2019 tho, i'd suggest you move on to VSCode

+8

Your question is posted twice. https://www.quora.com/How-can-I-run-my-code-written-in-Notepad++

+8

Did you correctly check the article PudeGO🌹😘🇳🇬[Less Active:School] ?? Whatever code you write in Notepad++ they are run in the browsers which ever you pick to work on - google chrome - firefox, etc

+8

simply open command promt (win+r then type cmd and hit enter) (i will use > to denote a new cmd line) cd to your working directory (where you have saved all your projects) i.e. > cd Documents\workspace\afolder then simply enter > g++ -o executable.exe source.cpp (where source.cpp is a c++ source file (in this case a single file project with the main function in source.cpp, and filename.exe is the name of the executable you want to create) for more complex projects it often helps to put stuff into a script (or use make, which i believe has a version available for windows) to handle the build processes as executing a script is easier than compiling a ton of cpp files. edit: I am assuming you have g++ running on windows cmd otherwise you will have to add mingw to your path variable (or just use the mingw bash emulator)

+7

Golooba Zubairi You are also beautiful. But don't do comments anything like this anywhere. You may get ban. You are here to learn. So do that only.

+5

👉Take a screenshot of your code from the computer 👉Share in your activity feed 👉And share your post link here in Q & A Or Type the entire code here

+4

click the three dots and select your bat file

+4

Save it with .html as the type for HTML , .php for PHP, .js for Javascript and .css for CSS

+4

Hari pro Satish Rajak Mallikarjun Reddy Don't ask any question in others question. Noone is going to entertain you.

+4

Save it .html, .css, and .js and it will work

+3

Sorry, Mirielle but this is providing an answer for "Notepad" not "Notepad++" Thanks anyway

+3

+3

PudeGO🌹😘🇳🇬[Less Active:School] .. Please, share your code here and and mention what part you are not able to execute. Is it the whole code or you getting any errors?

+3

+3

+3

+3

Just download notepad++ in ur pc from website and install it and then open it do code and save file with at its extension and run as its usual manner.

+3

For JavaScript, how I do it is that I integrate it into my html code, then run. You have to save the JavaScript separate from the html with .js. Then you use it as a link to the html code. Then you press F5 on your PC, then it brings out a Dropbox. then you select the code you have saved, then run it 😊😊

+3

I recommend Sublime Text 3, but that isn't what you asked. Ctrl-Alt-Shift-R Open in Chrome Ctrl-Alt-Shift-X Open in Firefox Ctrl-Alt-Shift-I Open in IE Ctrl-Alt-Shift-F Open in Safari