回答編集履歴
5
変更
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
#define New( element ) RealNew( element )
|
15
|
+
#define New( element ) RealNew( & element )
|
16
16
|
|
17
17
|
#define InputInt( number ) RealInputInt( & number )
|
18
18
|
|
@@ -34,11 +34,11 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
-
int RealNew(PtrPERSON person)
|
37
|
+
int RealNew(PtrPERSON* person)
|
38
38
|
|
39
39
|
{
|
40
40
|
|
41
|
-
person = (PtrPERSON)malloc( sizeof( struct PERSON ) );
|
41
|
+
*person = (PtrPERSON)malloc( sizeof( struct PERSON ) );
|
42
42
|
|
43
43
|
return 0;
|
44
44
|
|
4
変更
test
CHANGED
File without changes
|
3
変更
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
#define New( element ) RealNew(
|
15
|
+
#define New( element ) RealNew( element )
|
16
16
|
|
17
17
|
#define InputInt( number ) RealInputInt( & number )
|
18
18
|
|
@@ -34,11 +34,11 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
-
int RealNew(PtrPERSON
|
37
|
+
int RealNew(PtrPERSON person)
|
38
38
|
|
39
39
|
{
|
40
40
|
|
41
|
-
|
41
|
+
person = (PtrPERSON)malloc( sizeof( struct PERSON ) );
|
42
42
|
|
43
43
|
return 0;
|
44
44
|
|
2
変更
test
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
|
48
48
|
|
49
|
-
int InputString(char name
|
49
|
+
int InputString(char *name )
|
50
50
|
|
51
51
|
{
|
52
52
|
|
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
printf( "Input Year : " );
|
68
68
|
|
69
|
-
scanf( "%ld",
|
69
|
+
scanf( "%ld", year );
|
70
70
|
|
71
71
|
return 0;
|
72
72
|
|
1
変更
test
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
内容はわかりませんが、コンパイルが通るようにしました。
|
2
|
+
|
3
|
+
厳しいコンパイラみたいですね。
|
2
4
|
|
3
5
|
```c
|
4
6
|
|
@@ -32,17 +34,19 @@
|
|
32
34
|
|
33
35
|
|
34
36
|
|
35
|
-
|
37
|
+
int RealNew(PtrPERSON* person)
|
36
38
|
|
37
39
|
{
|
38
40
|
|
39
41
|
*person = (PtrPERSON)malloc( sizeof( struct PERSON ) );
|
40
42
|
|
43
|
+
return 0;
|
44
|
+
|
41
45
|
}
|
42
46
|
|
43
47
|
|
44
48
|
|
45
|
-
|
49
|
+
int InputString(char name[] )
|
46
50
|
|
47
51
|
{
|
48
52
|
|
@@ -50,17 +54,21 @@
|
|
50
54
|
|
51
55
|
scanf( "%s", name );
|
52
56
|
|
57
|
+
return 0;
|
58
|
+
|
53
59
|
}
|
54
60
|
|
55
61
|
|
56
62
|
|
57
|
-
|
63
|
+
int RealInputInt( long *year )
|
58
64
|
|
59
65
|
{
|
60
66
|
|
61
67
|
printf( "Input Year : " );
|
62
68
|
|
63
|
-
scanf( "%ld", year );
|
69
|
+
scanf( "%ld", &year );
|
70
|
+
|
71
|
+
return 0;
|
64
72
|
|
65
73
|
}
|
66
74
|
|