Skip to the task
Layout
Back to classic view

You are looking at lesson 11. Your place is still Practice test 1, task 1: About.

CREATETask 3 of 20 · step 3: Measurements in a fileCreate practice/11/CMakeLists.txt
Create practice/11/CMakeLists.txt in practice/11/

The program p11_measurements from measurements.c; course_data(measurements.txt) copies the data to where ▶ runs it.

Checklist

  • Every task is one commit with a clear message.
  • Zero compiler warnings: the code builds with -Werror.
  • Once per topic you step through your code in the debugger (CLion, gdb).
  • Every function has preconditions and postconditions, and assert tests check them.
  • A multi-file program: .h files with Doxygen comments and their own CMake target.
  • Input only through the safe functions of your own input.h.
  • Every error code is checked (fopen, fclose, malloc and so on).
practice 11 CMakeLists.txt Code Diff +2
A · NEW FILE Create this file. Every line is new: see the green bar.
add_executable(p11_measurements measurements.c)
course_data(measurements.txt)