Compile Error

foo.cc:4: warning: ignoring #pragma warning  [-Wunknown-pragmas]
    4 | #pragma warning(disable: 4996)
      | 
foo.cc:10:22: error: '_TCHAR' has not been declared
   10 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
foo.cc: In function 'int _tmain(int, int**)':
foo.cc:7:18: error: '__int64' was not declared in this scope; did you mean '__rintf64'?
    7 | #define ZHENGSHU __int64
      |                  ^~~~~~~
foo.cc:16:1: note: in expansion of macro 'ZHENGSHU'
   16 | ZHENGSHU fz, fm, zs, k, fh;
      | ^~~~~~~~
foo.cc:21:1: error: 'fh' was not declared in this scope
   21 | fh = -1;
      | ^~
foo.cc:26:1: error: 'fh' was not declared in this scope
   26 | fh = 1;
      | ^~
foo.cc:28:1: error: 'zs' was not declared in this scope; did you mean 'xs'?
   28 | zs = (ZHENGSHU)xs; //支持假分数
      | ^~
      | xs
foo.cc:30:1: error: 'k' was not declared in this scope
   30 | k = 1;
      | ^
foo.cc:34:1: error: 'fm' was not declared in this scope; did you mean 'tm'?
   34 | fm = XIAOSHUDIANZUOYI / k; //分母
      | ^~
      | tm
foo.cc:37:1: error: 'fz' was not declared in this scope
   37 | fz = (ZHENGSHU)(xs * fm); //分子
      | ^~
foo.cc:65:19: error: expected ')' before 'sqrt'
   65 | if (k > (ZHENGSHU)sqrt(fz))
      |    ~              ^~~~
      |                   )
foo.cc:72:6: error: 'fh' was not declared in this scope
   72 | fz = fh * zs;
      |      ^~
foo.cc:77:6: error: 'fh' was not declared in this scope
   77 | fz = fh * (fz + fm * zs);
      |      ^~
foo.cc:81:29: error: 'fh' was not declared in this scope
   81 | printf("%lf = %lld/%lld\n", fh * (zs + xs), fz, fm);
      |                             ^~
foo.cc:83:7: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
   83 | system("pause"); //防止窗口一闪而退
      | ~~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1065 分数转换
语言
C++
递交时间
2022-07-12 22:40:54
评测时间
2022-07-12 22:40:54
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes