Include guards prevents you from including an header file multiple times, it's done by using compiler precessors:
#ifndef FileUtils_H
#define FileUtils_H
#include "FileUtils.h"
#endif
You can also put a #pragma once at the top of the file:
#pragma once
#include "FileUtils.h"
There is also a generator for include guards available.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment