无法找到数字文字运算符'operator“”+ BLA'

问题描述 投票:0回答:1

我有这个:

#define BLA 10
#define BLABLA (0x3E+BLA)

我得到了:

错误:无法找到数字文字运算符'operator“”+ BLA'


示例代码:

#define BLA 10
#define BLABLA (0x3E+BLA)

int main()
{
    return BLABLA;
}

编译行(g ++ Ubuntu 5.4.0-6ubuntu1~16.04.9):

g++ example.cpp -o example
c++ operators literals preprocessor
1个回答
0
投票

用这个替换第二行(即添加空格)使它很开心:

#define BLABLA (0x3E + BLA)
© www.soinside.com 2019 - 2024. All rights reserved.