#include <iostream>
using namespace std;
class test
{
public:
register int a;
};
int main() {
// your code goes here
test t;
t.a = 10;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
错误:为'a'指定的存储类
有没有办法使用寄存器存储类作为成员变量?