the text editor to run the program
Answers
Answer:
That depends on what language it’s written in, and what interpreter or compiler you’re using, and on whether the program contains errors. (If it contains errors, it may not even compile, much less run.)
For compiled languages (eg, C, C++), you must first compile your source code to a machine-language executable file, typically with a “.exe” file name extension (eg, “my-program.exe”), then run the program by navigating to the directory it’s in, then typing its name preceded by “./”, then hitting Enter. For example: “./my-program.exe”.
For interpreted languages (eg, Perl, Python), put the appropriate shebang as the first line (eg, “#! /usr/bin/perl” or “#! /usr/bin/python”), save your file with appropriate extension (such as “.pl”, “.pm”, or “.perl” for Perl files, or “.py” for Python files), make it executable (google “chmod” for more info), then invoke it by just typing the name of the file and hitting Enter. For example: “./my-program.pl”.
In either case, I recommend using Windows 10, Notepad++, Cygwin, gcc, g++, Perl 5, and Python as your tool set. That gives you a BASH shell to the Windows operating system and file system, and allows easy CLI programming in multiple languages.
Answer:
That depends on what language it’s written in, and what interpreter or compiler you’re using, and on whether the program contains errors. (If it contains errors, it may not even compile, much less run.)
For compiled languages (eg, C, C++), you must first compile your source code to a machine-language executable file, typically with a “.exe” file name extension (eg, “my-program.exe”), then run the program by navigating to the directory it’s in, then typing its name preceded by “./”, then hitting Enter. For example: “./my-program.exe”.
For interpreted languages (eg, Perl, Python), put the appropriate shebang as the first line (eg, “#! /usr/bin/perl” or “#! /usr/bin/python”), save your file with appropriate extension (such as “.pl”, “.pm”, or “.perl” for Perl files, or “.py” for Python files), make it executable (google “chmod” for more info), then invoke it by just typing the name of the file and hitting Enter. For example: “./my-program.pl”.
In either case, I recommend using Windows 10, Notepad++, Cygwin, gcc, g++, Perl 5, and Python as your tool set. That gives you a BASH shell to the Windows operating system and file system, and allows easy CLI programming in multiple languages.