fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. class A{
  5. public:
  6. int num;
  7. void operator ~(){
  8. num/=2;
  9. }
  10. };
  11.  
  12. int main(){
  13. A num;
  14. num.num=50;
  15. ~num;
  16. cout<<num.num<<endl;
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 544KB
stdin
Standard input is empty
stdout
25