回答編集履歴
1
ヘッダからの表示を書き忘れたため追記
answer
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
#include <stdlib.h>
|
10
10
|
#include "hogehoge.h"
|
11
11
|
|
12
|
-
int main(){
|
12
|
+
int main() {
|
13
13
|
|
14
14
|
char str[10]="AAAAA";
|
15
15
|
int i;
|
@@ -22,4 +22,25 @@
|
|
22
22
|
|
23
23
|
return 0;
|
24
24
|
}
|
25
|
+
```
|
26
|
+
|
27
|
+
ヘッダからの文字列表示はヘッダで定義されていて
|
28
|
+
そのヘッダをincludeしているならできたはずです。
|
29
|
+
|
30
|
+
hogehoge.h
|
31
|
+
|
32
|
+
```
|
33
|
+
char str2[10]="AAAAA";
|
34
|
+
```
|
35
|
+
|
36
|
+
main.c
|
37
|
+
```
|
38
|
+
#include <stdio.h>
|
39
|
+
#include <stdlib.h>
|
40
|
+
#include "hogehoge.h"
|
41
|
+
|
42
|
+
void main() {
|
43
|
+
printf("%s\n",str2);
|
44
|
+
return;
|
45
|
+
}
|
25
46
|
```
|