fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8.  
  9. class foo
  10. {
  11. public:
  12. char* bar;
  13. };
  14.  
  15. char bam = 'x';
  16.  
  17. foo boo;
  18. boo.bar = &bam;
  19. cout<< *(boo.bar);
  20.  
  21. }
  22.  
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
x