So I was trying to include the libraries I have declared in my main.cpp to my header.h
//In my main.cpp
#include <cmath>
#include <deque>
#include <vector>
using namespace std;
//In my header.h
#ifndef HANOI_H
#define HANOI_H
#include <cmath>
#include <deque>
using namespace std;
#endif
Would this check my main.cpp to see wether the 3 libraries and namespace exist with the corresponding variable HANOI_H?
Yes because the
#include
s are performed which actually substitutes everything into 1 file. Therefore#ifndef
never cares about multiple files or knows about them.