Jump to content

  • Log In with Google      Sign In   
  • Create Account


#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