經安全檢測,此網站為安全網站,請放心前往原始網址!

C++: Pointer to class data member - Stack Overflow

I came across this strange code snippet which compiles fine: class Car { public: int speed; }; int main() { int Car::*pSpeed = &Car::speed; return 0; } Why does C++ have this pointer to a non-static data member of a class? What is the use of this strange

stackoverflow.com

網址安全性掃描由 google 提供