Skip to the task
Layout
Back to classic view

You are looking ahead. Your place is still task 1: About.

CHECKTask 2 of 17 · step 2: Questions 1–6The same .h twice
The same .h twice in practice/09/

daytime.h without an #ifndef guard defines typedef struct {...} Daytime; lecture.h includes it, main.c includes both. What happens?

Details & hint

Stuck? conflicting types for 'Daytime': the same .h twice in the same .c. The #ifndef / #define / #endif guard. (Topic 7)

practice 09 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p09_text text.c)
add_library(p09_safe_input STATIC safe_input.c)
target_include_directories(p09_safe_input PUBLIC .)
add_executable(p09_numbers numbers.c)
target_link_libraries(p09_numbers PRIVATE p09_safe_input)