Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualjbadams

Posted 15 February 2013 - 04:14 AM

I'm reading some source code from a book and I just saw that for a header file the author used pragma once,and for another,he just used header guards.
 
I read that pragma once make the code faster and has some other advantages.But should I know anything else? Like when to use header guards or pragma once?
 
Because I read only good things about pragma once and I don't understand why one would use header guards instead of using it.

: Added tags


#1noatom

Posted 05 February 2013 - 11:34 AM

I'm reading some source code from a book and I just saw that for a header file the author used pragma once,and for another,he just used header guards.

 

I read that pragma once make the code faster and has some other advantages.But should I know anything else? Like when to use header guards or pragma once?

 

Because I read only good things about pragma once and I don't understand why one would use header guards instead of using it.


PARTNERS