Feature/Trick #4 :
#ifndef FILE_H
#define FILE_H
...
#endif
How is this "Cool C Programming"? What am I missing? Feature/Trick #4 :
#ifndef FILE_H
#define FILE_H
...
#endif
How is this "Cool C Programming"? What am I missing?Fun fact: Oracle (Sun) Studio doesn't support #pragma once. Instead, it actually looks for proper include guards in the header and if they exist, it optimizes away re-includes of the file if the condition is false.
#ifndef FOO_H
#include <foo.h>
#endif