fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. char bb(char &ch)
  5. {
  6. int x = -1;
  7. if(x++ > x)
  8. {
  9. cout << "A: " << ch << endl;
  10. return ++ch;
  11. }
  12. else
  13. {
  14. cout << "B: " << ch << endl;
  15. return --ch;
  16. }
  17.  
  18. }
  19.  
  20. int main() {
  21.  
  22. char ch1 = 'b';
  23. char ch2 = bb(ch1);
  24. cout << ch1 << ch2;
  25. return 0;
  26. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
B: b
aa