回答編集履歴
1
加筆
test
CHANGED
@@ -65,3 +65,111 @@
|
|
65
65
|
}
|
66
66
|
|
67
67
|
```
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
[OTHERWISE:]
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
```C
|
76
|
+
|
77
|
+
/* test.h */
|
78
|
+
|
79
|
+
#ifndef TEST_H_
|
80
|
+
|
81
|
+
#define TEST_H_
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
#ifdef __cplusplus
|
86
|
+
|
87
|
+
extern "C" {
|
88
|
+
|
89
|
+
#endif
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
void say();
|
94
|
+
|
95
|
+
void printLine();
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
#ifdef __cplusplus
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
#endif
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
#endif
|
108
|
+
|
109
|
+
```
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
```C
|
114
|
+
|
115
|
+
/* test.c */
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
#include <stdio.h>
|
120
|
+
|
121
|
+
#include "test.h"
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
void say(){
|
126
|
+
|
127
|
+
printLine();
|
128
|
+
|
129
|
+
printf("I love imooc\n");
|
130
|
+
|
131
|
+
printf("good good study!\n");
|
132
|
+
|
133
|
+
printf("day day up!\n");
|
134
|
+
|
135
|
+
printLine();
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
```
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
```C
|
144
|
+
|
145
|
+
/* main.c */
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
#include <stdio.h>
|
150
|
+
|
151
|
+
#include "test.h"
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
void printLine()
|
156
|
+
|
157
|
+
{
|
158
|
+
|
159
|
+
printf("**************\n");
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
int main()
|
166
|
+
|
167
|
+
{
|
168
|
+
|
169
|
+
say();
|
170
|
+
|
171
|
+
return 0;
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
```
|