【发布时间】:2014-02-18 21:30:08
【问题描述】:
我正在 MSVC 2012 中编译以下内容
#define DOUB (i) ((i)+(i))
int _tmain(int argc, _TCHAR* argv[])
{
for (int i(0); i <= 10; i++)
std::cout << "twice" << i << "is" << DOUB(i) << '\n'; // 22
system("PAUSE");
return 0;
}
第 22 行出现以下错误:error C2064: term does not evaluate to a functiontaking 1 arguments
谁能帮忙?
【问题讨论】:
标签: c++ macros c-preprocessor