求助:int128
  • 板块学术版
  • 楼主迷途的小酒
  • 当前回复16
  • 已保存回复16
  • 发布时间2021/8/12 17:21
  • 上次更新2023/11/4 10:54:05
查看原帖
求助:int128
297557
迷途的小酒楼主2021/8/12 17:21
#include<bits/stdc++.h>
using namespace std;
main() {
	__int128_t y = 2200000000000000L;
}

给出了编译错误信息:

[17:18:51] [编译器] [编译已开始]
[17:18:53] [编译器] [编译时发生错误]
[17:18:53] [编译错误] [
C:/Users/Administrator/AppData/Local/Temp/CP Editor-YAFDkf/sol.cpp: In function 'int main()':
C:/Users/Administrator/AppData/Local/Temp/CP Editor-YAFDkf/sol.cpp:8:2: error: expected primary-expression before '__int128'
    8 |  __int128 y = 2200000000000000L;
      |  ^~~~~~~~
]

接下来我把 __int128_t 变成了 __int128。又说编译错误:

[17:20:23] [编译器] [编译已开始]
[17:20:25] [编译器] [编译时发生错误]
[17:20:25] [编译错误] [
C:/Users/Administrator/AppData/Local/Temp/CP Editor-YAFDkf/sol.cpp: In function 'int main()':
C:/Users/Administrator/AppData/Local/Temp/CP Editor-YAFDkf/sol.cpp:8:2: error: expected primary-expression before '__int128'
    8 |  __int128 y = 2200000000000000L;
      |  ^~~~~~~~
]

那么我到底应该如何使用 int128?

2021/8/12 17:21
加载中...