Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1.  
  2. #include<stdio.h>
  3. class MyCout
  4. {
  5. public:
  6. void operator<<(char* str)
  7. {
  8. printf("%s",str);
  9. }
  10.  
  11.  
  12. }myco;
  13.  
  14. class MyCin
  15. {
  16. public:
  17. void operator>>(char* str)
  18. {
  19. scanf("%[^\n]s",str);
  20. }
  21.  
  22. }myci;
  23.  
  24. int main()
  25. {
  26.  
  27.  
  28.  
  29. char str[] = "Game over";
  30. int a = 0;
  31. myci >> a;
  32. myco << a ;
  33.  
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement