Can someone explain header gaurd in simple words and also with a small example? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Can someone explain header gaurd in simple words and also with a small example?

1st Jun 2020, 12:29 PM
SHALINI
2 Respostas
+ 2
header guards prevent you from including the same file twice. Like if in your code there are lines: #include <myheader.h> #include <myheader.h> /*some code*/ The second include would be ignored.
1st Jun 2020, 12:54 PM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar
1st Jun 2020, 2:38 PM
SHALINI