fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct mvUpS
  5. {
  6. int n;
  7. };
  8.  
  9. mvUpS mvUp(int n) {
  10. return mvUpS{n};
  11. }
  12.  
  13. std::ostream& operator<<(std::ostream& ss, const mvUpS &s) {
  14. return ss << "\033[" << s.n << "A";
  15. }
  16.  
  17. int main() {
  18. std::cout << mvUp(1);
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5504KB
stdin
Standard input is empty
stdout