Hi, I keep running across the following two lines at the top of header files:
#ifndef NAME
#define NAME
So these stop me from including this header file in multiple places? What if I have two separate files that both need to include these headers?
The problem I'm having in my code is that I include some header files, but when I call functions from them they don't execute as I would expect. If I use system() to call a program using the same header functions from within the not working file, things work.
So I am wondering what exactly these #ifndef/#define statements do. I read the wikipedia page already, but I need more help.
#ifndef NAME
#define NAME
So these stop me from including this header file in multiple places? What if I have two separate files that both need to include these headers?
The problem I'm having in my code is that I include some header files, but when I call functions from them they don't execute as I would expect. If I use system() to call a program using the same header functions from within the not working file, things work.
So I am wondering what exactly these #ifndef/#define statements do. I read the wikipedia page already, but I need more help.