Compile Error

foo.cc:5:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(disable: 4996)
 
foo.cc:11:22: error: '_TCHAR' has not been declared
 int _tmain(int argc, _TCHAR* argv[])
                      ^~~~~~
foo.cc: In function 'int _tmain(int, int**)':
foo.cc:8:18: error: '__int64' was not declared in this scope
 #define ZHENGSHU __int64
                  ^
foo.cc:17:1: note: in expansion of macro 'ZHENGSHU'
 ZHENGSHU fz, fm, zs, k, fh;
 ^~~~~~~~
foo.cc:8:18: note: suggested alternative: '__rintf64'
 #define ZHENGSHU __int64
                  ^
foo.cc:17:1: note: in expansion of macro 'ZHENGSHU'
 ZHENGSHU fz, fm, zs, k, fh;
 ^~~~~~~~
foo.cc:22:1: error: 'fh' was not declared in this scope
 fh = -1;
 ^~
foo.cc:27:1: error: 'fh' was not declared in this scope
 fh = 1;
 ^~
foo.cc:29:1: error: 'zs' was not declared in this scope
 zs = (ZHENGSHU)xs; //支持假分数
 ^~
foo.cc:29:1: note: suggested alternative: 'xs'
 zs = (ZHENGSHU)xs; //支持假分数
 ^~
 xs
foo.cc:31:1: error: 'k' was not declared in this scope
 k = 1;
 ^
foo.cc:35:1: error: 'fm' was not declared in this scope
 fm = XIAOSHUDIANZUOYI / k; //分母
 ^~
foo.cc:35:1: note: suggested alternative: 'fma'
 fm = XIAOSHUDIANZUOYI / k; //分母
 ^~
 fma
foo.cc:38:1: error: 'fz' was not declared in this scope
 fz = (ZHENGSHU)(xs * fm); //分子
 ^~
foo.cc:66:19: error: expected ')' before 'sqrt'
 if (k > (ZHENGSHU)sqrt(fz))
                   ^~~~
foo.cc:73:6: error: 'fh' was not declared in this scope
 fz = fh * zs;
      ^~
foo.cc:78:6: error: 'fh' was not declared in this scope
 fz = fh * (fz + fm * zs);
      ^~
foo.cc:82:29: error: 'fh' was not declared in this scope
 printf("%lf = %lld/%lld\n", fh * (zs + xs), fz, fm);
                             ^~
foo.cc:84:7: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
 system("pause"); //防止窗口一闪而退
 ~~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1132 分数转换
语言
C++
递交时间
2021-10-24 17:44:23
评测时间
2021-10-24 17:44:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes