Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:15:63: error: stray '\357' in program
     scanf("%lf%lf %lf%lf %s",&a.real,&a.image,&b.real,&b.image,&s);
                                                               ^
/in/ex1.c:15:64: error: stray '\274' in program
     scanf("%lf%lf %lf%lf %s",&a.real,&a.image,&b.real,&b.image,&s);
                                                                ^
/in/ex1.c:15:65: error: stray '\214' in program
     scanf("%lf%lf %lf%lf %s",&a.real,&a.image,&b.real,&b.image,&s);
                                                                 ^
/in/ex1.c:15:66: error: invalid operands to binary & (have 'double *' and 'int')
     scanf("%lf%lf %lf%lf %s",&a.real,&a.image,&b.real,&b.image,&s);
                                                       ~~~~~~~~   ^
/in/ex1.c:16:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     if (s='+'){
     ^~
/in/ex1.c:20:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     if(s='*'){
     ^~
/in/ex1.c:22:33: error: 'ComplexNumber {aka struct <anonymous>}' has no member named 'rea'; did you mean 'real'?
         c.image=a.image*b.real+a.rea;*b.image;
                                 ^
/in/ex1.c:22:38: error: invalid type argument of unary '*' (have 'double')
         c.image=a.image*b.real+a.rea;*b.image;
                                      ^~~~~~~~

Information

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