回答編集履歴
1
加筆
answer
CHANGED
@@ -31,4 +31,58 @@
|
|
31
31
|
say();
|
32
32
|
return 0;
|
33
33
|
}
|
34
|
+
```
|
35
|
+
|
36
|
+
[OTHERWISE:]
|
37
|
+
|
38
|
+
```C
|
39
|
+
/* test.h */
|
40
|
+
#ifndef TEST_H_
|
41
|
+
#define TEST_H_
|
42
|
+
|
43
|
+
#ifdef __cplusplus
|
44
|
+
extern "C" {
|
45
|
+
#endif
|
46
|
+
|
47
|
+
void say();
|
48
|
+
void printLine();
|
49
|
+
|
50
|
+
#ifdef __cplusplus
|
51
|
+
}
|
52
|
+
#endif
|
53
|
+
|
54
|
+
#endif
|
55
|
+
```
|
56
|
+
|
57
|
+
```C
|
58
|
+
/* test.c */
|
59
|
+
|
60
|
+
#include <stdio.h>
|
61
|
+
#include "test.h"
|
62
|
+
|
63
|
+
void say(){
|
64
|
+
printLine();
|
65
|
+
printf("I love imooc\n");
|
66
|
+
printf("good good study!\n");
|
67
|
+
printf("day day up!\n");
|
68
|
+
printLine();
|
69
|
+
}
|
70
|
+
```
|
71
|
+
|
72
|
+
```C
|
73
|
+
/* main.c */
|
74
|
+
|
75
|
+
#include <stdio.h>
|
76
|
+
#include "test.h"
|
77
|
+
|
78
|
+
void printLine()
|
79
|
+
{
|
80
|
+
printf("**************\n");
|
81
|
+
}
|
82
|
+
|
83
|
+
int main()
|
84
|
+
{
|
85
|
+
say();
|
86
|
+
return 0;
|
87
|
+
}
|
34
88
|
```
|