how to run code in devcpp

  1. Open Dev-C++ IDE on your computer.

  2. Click on "File" in the menu bar, then select "New" and choose "Source File" to create a new C++ source code file.

  3. Write or paste your C++ code into the editor.

  4. Save the file by clicking on "File" and then "Save" or "Save As". Choose a suitable location and provide a filename with the ".cpp" extension.

  5. Click on the "Compiler" menu, then select "Compile" to check for any syntax errors in your code.

  6. If there are no errors, click on the "Compiler" menu again, and select "Run". This will compile and execute your C++ program.

  7. If there are errors, review the error messages in the "Output" window at the bottom of the IDE. Fix the errors in your code and repeat steps 5 and 6.

  8. View the output of your program in the "Output" window. If your program requires input, you can provide it through the console window that appears.

  9. Close the console window when you are done running the program.

  10. To exit Dev-C++, click on "File" and then "Exit" or simply close the IDE window.

Note: Ensure that you have a compatible C++ compiler installed on your system and configured in Dev-C++. Additionally, make sure to set up the necessary compiler and debugger settings in Dev-C++ if you are using it for the first time.