Aug 24, 2013 at 4:30am UTC
I have a .cpp file and a .h file in my .h file I have difinitions...
1 2 3 4
#ifdef DEFINITION
#define DEFINITION
#define THIS_THING
#endif
I have probably 20 definitions in my .cpp
I use THIS_THING and my compiler g++ says it doesn't exist...
I have a #include "myheader.h"
What is wrong???
Last edited on Aug 24, 2013 at 5:01am UTC
Aug 24, 2013 at 5:11am UTC
Asci codes
#define BLACK_BG \033[7;30m"
Etc every color for background , text, bold, dark, underline, etc
Aug 24, 2013 at 5:12am UTC
You have an #ifdef there, did you mean #ifndef for include guards?
Aug 24, 2013 at 5:20am UTC
Thanks I just assumed it was ifdef...
Aug 24, 2013 at 5:26am UTC
#ifdef means "if defined", so if that macro wasn't defined nothing inside will be compiled.
Aug 24, 2013 at 5:39am UTC
Yeah I always wondered about that I would read .h files and see
#ifndef
But I thought it said
#ifdef