---
title: "What You Should Include in a Header File ?"  
description: "What You Should Include in a Header File ?"  
author: "Dependra Pathak"  
published: 2011-03-28  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/676/what-you-should-include-in-a-header-file  
category: "visual c++"  
tags: ["visual c++"]  
reading_time: 1 minute  

---

# What You Should Include in a Header File ?

A header file should begin and end with #include guards to guarantee that it?s not #included more than once during the same compilation session. A typical #include guard looks as follows:\
// from stdlib.h\
#ifndef STDLIB_INCLUDED // included for the first time?\
#define STDLIB_INCLUDED

## Answers

### Answer by Dependra Pathak

A header file should begin and end with #include guards to guarantee that it?s not #included more than once during the same compilation session. A typical #include guard looks as follows:\
// from stdlib.h\
#ifndef STDLIB_INCLUDED // included for the first time?\
#define STDLIB_INCLUDED


---

Original Source: https://www.mindstick.com/interview/676/what-you-should-include-in-a-header-file

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
