Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:14:33: error: 'ComplexNumber {aka struct <anonymous>}' has no member named 'image'; did you mean 'imag'?
     scanf("%lf+%lf\n",&a.real,&a.image);
                                 ^
/in/ex1.c:15:33: error: 'ComplexNumber {aka struct <anonymous>}' has no member named 'image'; did you mean 'imag'?
     scanf("%lf+%lf\n",&b.real,&b.image);
                                 ^
/in/ex1.c:17:6: error: 'ComplexNumber {aka struct <anonymous>}' has no member named 'image'; did you mean 'imag'?
     c.image=a.image+b.image;
      ^
/in/ex1.c:17:14: error: 'ComplexNumber {aka struct <anonymous>}' has no member named 'image'; did you mean 'imag'?
     c.image=a.image+b.image;
              ^
/in/ex1.c:17:22: error: 'ComplexNumber {aka struct <anonymous>}' has no member named 'image'; did you mean 'imag'?
     c.image=a.image+b.image;
                      ^
/in/ex1.c:18:34: error: 'ComplexNumber {aka struct <anonymous>}' has no member named 'image'; did you mean 'imag'?
     printf("c=%f+%fi\n", c.real,c.image) ;
                                  ^

Information

Submit By
Type
Submission
Problem
h4ex1: Structure, basic programming
Homework
Assignment 4
Language
C
Submit At
2018-06-21 13:21:26
Judged At
2018-06-21 13:21:26
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes