1. Open Code::Blocks.
  2. Click on "File" > "New" > "Project...".
  3. Choose "Console Application" and click "Go".
  4. Select "C++" as the programming language and choose a project name and location. Click "Next".
  5. Choose "Console application" and click "Next".
  6. Select "GNU GCC Compiler" and click "Finish".

In the editor, you'll see a template code. Replace it with the following:

#include <iostream>

using namespace std;

int main() {
    cout << "Hello, World!" << endl;
    return 0;
}


Save the file (Ctrl + S) and click on the build button (green hammer icon) to compile and run the program.

You should see "Hello, World!" printed in the console.