Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- class MyCout
- {
- public:
- void operator<<(char* str)
- {
- printf("%s",str);
- }
- }myco;
- class MyCin
- {
- public:
- void operator>>(char* str)
- {
- scanf("%[^\n]s",str);
- }
- }myci;
- int main()
- {
- char str[] = "Game over";
- int a = 0;
- myci >> a;
- myco << a ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement