run and compile c and cpp program using notepad++ and gcc and g++ compiler
Title
Question
We have windows OS 10 only in our college. I installed gcc and g++ compilers and notepad ++ in all PCs. Can you kindly provide step by step procedure to write compile and run c and cpp programs using these editors and notepad++. It is a humble request. In instruction sheet ,It is not given properly.
C-and-Cpp First-C-Program 07-08 min 20-30 sec
Answers:
Once you have written the code, open the Windows command prompt.
Using the cd command go to the folder where you have saved the file.
E.g.) c:\\\\Users\\\\(username)\\\\Desktop\\\\My-Code\\\\
To compile the c program, type on the command prompt: gcc talk.c -o myoutput
gcc is the compiler.
talk.c is the filename.
-o myoutput says that the executable should go to the file myoutput.
To execute the program, </span>type on the command prompt: ./myoutput
'gcc' is not recognized as an internal or external command,
operable program or batch file.
What is the reason for this error.
Login to add comment