How to use Code Blocks to write C, C++ programs

Because Code Blocks is software that has the function of creating other software and games, how to use it will be a bit difficult. Therefore, you can refer to how to use Code Blocks in TipsMake's article below.

 How to use Code Blocks

1. How to create a C program in Code Blocks

Step 1: Open Code Blocks IDE, then access the path: File => New => File.

How to use Code Blocks to write C, C++ programs Picture 1

Step 2: When the New form template window appears, select C/C++ source and select Go.

How to use Code Blocks to write C, C++ programs Picture 2

Step 3: At this time, a welcome window will appear on the screen, where you click Next .

Also, in case you do not want the window to display next time, check the box next to the Skip this page next time option .

How to use Code Blocks to write C, C++ programs Picture 3

Step 4: In this step, you can choose C or C++ as the programming language.

How to use Code Blocks to write C, C++ programs Picture 4

Step 5 : Name the file, and select a folder and location to save the file, then click Finish.

How to use Code Blocks to write C, C++ programs Picture 5

Step 6: After writing a program, you can use the combination Ctrl + S to save the program.

Besides, to consolidate your knowledge and self-study code, readers can refer to the top best programming learning websites here to practice your skills.

2. How to compile programs in Code Blocks

After you have created the C program, the next step you need to do is compile and run the program.

To compile and run a C program, find and click Build => Build and run or use the shortcut F9.

How to use Code Blocks to write C, C++ programs Picture 6

In case if the program has any errors or problems. Error messages will be displayed in the Build messages tab below the code editor.


The article above TipsMake has shown you how to use the most basic Code Blocks. If you have any questions, please leave a comment below.

5 ★ | 1 Vote

May be interested

  • 4 ways to write multi-threaded code in Java4 ways to write multi-threaded code in Java
    multithreading is a method of writing code to execute multiple tasks in parallel. java offers great support for multi-threaded code writing right from java 1.0 version. recent improvements in java have increased the number of ways that code is structured to combine multiple threads in java programs.
  • Operations with blocks in ExcelOperations with blocks in Excel
    the following article shows you how to manipulate blocks in excel. frequently used operations in spreadsheets when working with blocks: 1. select blocks of contiguous cells. place the mouse cursor in the first cell position of the block - hold the left mouse button dragging
  • GitHub introduces a new feature that allows you to write code directly in the browserGitHub introduces a new feature that allows you to write code directly in the browser
    github has launched codespaces - a feature that allows you to write code directly on the web without setting up any additional requirements.
  • How to write emails effectively and professionally?How to write emails effectively and professionally?
    every day you work with colleagues, partners via email, chat programs ... is a main and professional communication channel at work, how to be effective as well as optimize time and performance which email messages do you bring to you?
  • How to read and write files using JES applicationHow to read and write files using JES application
    jes is a programming environment that you can use to write, test, and run code locally on your computer. jes offers many features such as photo, video and other media editing.
  • JavaScript functionsJavaScript functions
    a function is a group of reusable code that can be called anywhere in your program. this makes it unnecessary to write the same code over and over again. it helps programmers write modular code. functions allow a programmer to divide a large program into small and manageable functions.
  • How to fix Attempted Write to Readonly Memory on WindowsHow to fix Attempted Write to Readonly Memory on Windows
    attempting write to readonly memory error (stop code 0x000000be) is one of the blue screen errors, which occurs when a driver tries to write to read-only in computer memory.
  • Admire the robot model can transform itself as TransformerAdmire the robot model can transform itself as Transformer
    m-blocks 2.0 can also move along other blocks, climb or climb down and even jump up.
  • Instructions to write and read the code is correctInstructions to write and read the code is correct
    in the article below, network administrator will guide you how to write and read roman numbers correctly. invite you to follow along.
  • How to Run HTML Files on Visual Studio CodeHow to Run HTML Files on Visual Studio Code
    visual studio code is microsoft's source code editor. the program is currently available for windows, macos, and linux. with visual studio code, you'll be able to write and edit code in many different programming languages, including html. but what do you do when you want to implement some html code? luckily, there are many extensions for visual studio code that make it easy to execute html code right in visual studio code. additionally, you can also use terminal to run html files. today's tipsmake will show you how to run html files on visual studio code.