fork(1) download
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. #define MAX(a, b) ((a) > (b) ? (a) : (b))
  5.  
  6. void test1 () {
  7. int a = 5, b = 7;
  8.  
  9. int res = MAX(a, ++b);
  10. std::cout << "test1: " << res << std::endl;
  11. }
  12.  
  13. void test2 () {
  14. int a = 5, b = 7;
  15.  
  16. int res = std::max (a, ++b);
  17. std::cout << "test2: " << res << std::endl;
  18. }
  19. int main() {
  20. test1 ();
  21. test2 ();
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5512KB
stdin
Standard input is empty
stdout
test1: 9
test2: 8