You are looking at lesson 1. Your place is still lesson 2, task 1: Types.
How main.c becomes a program, why every warning is an error and how to get your repository.
A processor runs only machine code. Your main.c is text, so it has to be translated before it can run. That is the job of the compiler: in our case GCC from MinGW, which is already inside CLion.
#include files: #include <stdio.h> brings in the declaration of printf.printf, for example, is already written for you) into one executable file.CLion does all of this with one button, ▶: it builds and runs. How to build the program is described by the CMake file CMakeLists.txt.
The course's CMakeLists.txt gives the compiler these flags:
-std=c17 -Wall -Wextra -Werror -pedantic -Wvla
-std=c17: pure standard C17, without GNU extensions;-Wall -Wextra -pedantic: turn on almost every warning;-Wvla: forbids variable-length arrays (int t[n];, topic 6);-Werror: every warning becomes an error, and the program does not build until you fix it.At first this is annoying. But a warning is almost always a bug that hasn't shown up yet, and this way you catch it at once.
You do all your work in one GitHub repository, created by GitHub Classroom:
Build files have been written to: .../build/debug.The repository already has:
CMakeLists.txt the course build (no need to change it)
CMakePresets.json Debug, Release and CI settings
include/input.h safe input (from topic 2)
src/input.c
practice/ your lesson programs go here
hw/01/ topic 1 homework with tests
tests/ tests of input.h
.github/workflows/ tests on GitHub after every push
Next to the code tasks you will see the course checklist. Its first item: every task is one commit. Finished a task → Ctrl+K, write a short message, e.g. Add first program, and click Commit and Push.
After every push GitHub builds your code on Linux with AddressSanitizer and runs the tests. You see the result in your repository's Actions tab: what red and green mean there, we go through in the homework.
Each one ticks itself when you do it.
All six done. You know your way around.
It is laid out like CLion: the same panels in the same places. This tour shows each one, and you can reopen it any time with Tour.
Switches the left panel: Lesson plan, Project files, Changes. Click the active icon again to hide the panel.
In CLion: the tool window bar runs down the left edge, too.
This part is not on this task: it appears when a task needs it.
Every task in this lesson. Now marks your place. Clicking a task only lets you look; it never moves your place. Project files and Changes open here too.
In CLion: this spot holds the Project view (the file tree).
This part is not on this task: it appears when a task needs it.
Opens the file for your task by itself. A tab appears for each file the step opens. The breadcrumbs above the code show the folder.
In CLion: the same editor tabs and breadcrumbs.
This part is not on this task: it appears when a task needs it.
Diff shows what changed, like git diff: red is the old code, green the new.
In CLion: the diff view in the Commit window looks the same.
This part is not on this task: it appears when a task needs it.
Terminal for build commands, Database to see your tables. They open by themselves when a task needs them. Drag the top edge to resize.
In CLion: Terminal, and the Database tool window.
This part is not on this task: it appears when a task needs it.
What to do now, right above the code, so you never miss it. Numbered notes in the code explain the important lines. Details shows what you should see and a hint.
In CLion: no equivalent: this is your lecturer's guide.
This part is not on this task: it appears when a task needs it.
Done is the only button that moves you forward. Look back lets you review without losing your place.
This part is not on this task: it appears when a task needs it.
Guided, Focus code or Floating. You can drag the panel edges too. Your layout is remembered for next time.
In CLion: you can also rearrange and hide tool windows.
This part is not on this task: it appears when a task needs it.
Six small missions. Each one ticks itself when you do it, so you know you have found everything.