我试图定义ll为long long. 但是,这没有编译并引发错误。
我在 Windows 机器上使用 VS Code。我也在使用 gcc 8.2.0 版。
这是代码 -
#include <bits/stdc++.h>
using namespace std;
#define ll long long int;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll t;
cin >> t;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
在编译这个时,我收到了这个错误 -
test.cpp: In function 'int main()':
test.cpp:5:22: error: declaration does not declare anything [-fpermissive]
#define ll long long int;
^~~
test.cpp:12:5: note: in expansion of macro 'll'
ll t;
^~
test.cpp:12:8: error: 't' was not declared in this scope …Run Code Online (Sandbox Code Playgroud)