fork(5) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A {
  5. public:
  6. double b[10];
  7. };
  8.  
  9. typedef double (A::*bptr_t)[10];
  10.  
  11. int main() {
  12. A a;
  13. a.b[0] = 42;
  14.  
  15. bptr_t c = &A::b;
  16.  
  17.  
  18. cout << "42: " << (a.*c)[0] << endl;
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
42: 42