如何使以下代码生效?
for (auto f=face.begin(); f!=face.end(); ++f)
{
if (std::addressof(*f) == 0x18b9160) // error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
{
cout << "found";
}
}
答案 0 :(得分:3)
if (std::addressof(*f) == (void*)0x18b9160)