Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualjbadams

Posted 15 February 2013 - 04:14 AM

Hello, I was working on a project and it says that I have redefined a class, It took me 20 min to figure out that my inclusion guards where not working. I wrote them like so:
 
#ifndef IMAGE_HANDLER_H
#define IMAGE_HANDLER_H
 
class ImageHandler{
 
    //Handle stuff
};
 
#endif //IMAGE_HANDLER_H
 
 
Am I doing them wrong? Is there a better way to do them? Am I just crazy? Thank you in advance for your help.

: Added tags


#2Mathew Bergen

Posted 15 February 2013 - 01:05 AM

Hello, I was working on a project and it says that I have redefined a class, It took me 20 min to figure out that my inclusion guards where not working. I wrote them like so:

 

#ifndef IMAGE_HANDLER_H
#define IMAGE_HANDLER_H
 
class ImageHandler{
 
    //Handle stuff
};
 
#endif //IMAGE_HANDLER_H
 

 

Am I doing them wrong? Is there a better way to do them? Am I just crazy? Thank you in advance for your help.


#1Mathew Bergen

Posted 15 February 2013 - 01:03 AM

Hello, I was working on a project and it says that I have redefined a class, It took me 20 min to figure out that my inclusion guards where not working. I wrote them like so:

#ifndef IMAGE_HANDLER_H
#define IMAGE_HANDLER_H
 
calss ImageHandler{
 
    //Handle stuff
};
 
#endif //IMAGE_HANDLER_H
 

 

Am I doing them wrong? Is there a better way to do them? Am I just crazy? Thank you in advance for your help.


PARTNERS