Why do we have to include the header structs.h every time we use structures? Why it should be included as #include "structs.h" not as #include <structs.h>?

1 Answer 1


This is not true, we can use structures without using that header file. It is possible that your source code specifically needs that file, but not in general. If we write:

#include "structs.h"

Means that the given file is in the same directory as the source code. If we write:

#include <structs.h>

The header file is usually located in a special system directory, usually: /usr/include/

  • Actually, it was in the notes that CS50 provides with lectures. I tried to include the header and i gave me error in CS50 IDE. Only when i removed/commented it, the program compiled and ran successfully. Commented May 7, 2017 at 17:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .