记录详情

Compile Error

/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;
      |                ^~

信息

递交者
类型
递交
题目
P1183 五角大楼
比赛
2025程序设计与竞赛作业赛第一场(整装出发)
语言
C
递交时间
2025-09-27 20:58:56
评测时间
2025-10-03 02:18:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes