如何使以下代码正常工作?
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";
}
}
最佳答案
if (std::addressof(*f) == (void*)0x18b9160)