/in/foo.c:2:1: error: unknown type name 'using'
2 | using namespace std;
| ^~~~~
/in/foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
2 | using namespace std;
| ^~~
/in/foo.c: In function 'main':
/in/foo.c:7:17: warning: format '%f' expects argument of type 'float *', but argument 2 has type 'double *' [-Wformat=]
7 | scanf("%f%f%f%f",&xA,&yA,&xB,&yB);
| ~^ ~~~
| | |
| float * double *
| %lf
/in/foo.c:7:19: warning: format '%f' expects argument of type 'float *', but argument 3 has type 'double *' [-Wformat=]
7 | scanf("%f%f%f%f",&xA,&yA,&xB,&yB);
| ~^ ~~~
| | |
| float * double *
| %lf
/in/foo.c:7:21: warning: format '%f' expects argument of type 'float *', but argument 4 has type 'double *' [-Wformat=]
7 | scanf("%f%f%f%f",&xA,&yA,&xB,&yB);
| ~^ ~~~
| | |
| float * double *
| %lf
/in/foo.c:7:23: warning: format '%f' expects argument of type 'float *', but argument 5 has type 'double *' [-Wformat=]
7 | scanf("%f%f%f%f",&xA,&yA,&xB,&yB);
| ~^ ~~~
| | |
| float * double *
| %lf
/in/foo.c:13:27: error: 'xC' undeclared (first use in this function); did you mean 'xB'?
13 | printf("%.3f%.3f",xC,yC);
| ^~
| xB
/in/foo.c:13:27: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:13:30: error: 'yC' undeclared (first use in this function); did you mean 'yB'?
13 | printf("%.3f%.3f",xC,yC);
| ^~
| yB
/in/foo.c:9:16: warning: unused variable 'dy' [-Wunused-variable]
9 | double dy=yB-yA;
| ^~
/in/foo.c:8:16: warning: unused variable 'dx' [-Wunused-variable]
8 | double dx=xB-xA;
| ^~