[问题] One problem from a header file

楼主: gecer (gecer)   2017-12-09 12:01:59
https://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html
from the link I saw a head
foo.h
#ifndef foo_h__
#define foo_h__
extern void foo(void);
#endif // foo_h__
What is the usage of "foo_h__" here?
作者: wawi2 (@@)   2017-12-09 12:07:00
header guard. if means if the header is not defined,define it. That way, compiler saves time from go overthe same files. Another benefit is to make sure the notwo ambiguous, duplicate headers are being compiled.
作者: galic (嘎利)   2017-12-09 12:42:00
作者: Ommm5566 (56天團)   2017-12-10 07:40:00
楼上XDDDDDDDDDDDDD
作者: jack1218 (赤城我老婆)   2017-12-11 08:26:00
怎么觉得文法怪怪的
作者: MOONRAKER (㊣牛鹤鳗毛人)   2017-12-12 09:20:00
I saw a head.
作者: CoNsTaR ((const *))   2017-12-12 21:00:00
A head was seen.
作者: MOONRAKER (㊣牛鹤鳗毛人)   2017-12-13 10:04:00
一楼写得不错阿 除了第一个if应该是it 没什么问题@gecer: Have you taken formal programming courses

Links booklink

Contact Us: admin [ a t ] ucptt.com