fork(1) download
  1. #include <iostream>
  2.  
  3. struct Bah
  4. {
  5. int x;
  6. };
  7.  
  8. std::ostream& operator<<(std::ostream& s, const Bah* p)
  9. {
  10. return s << "x = " << p->x;
  11. }
  12.  
  13. int main()
  14. {
  15. Bah b{1};
  16. Bah* p = &b;
  17. std::cout << p;
  18. return 0;
  19. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
x = 1