//////////#include <iostream>
//////////
//////////using namespace std;
//////////
//////////int main()
//////////{
////////// cout << "Hello world!" << endl;
////////// return 0;
//////////}
////////
////////
////////
////////#include <iostream>
////////using namespace std;
////////class Power{
////////int kick;
////////int punch;
////////public:
//////// Power(int kick=0,int punch=0) { this->kick=kick; this->punch=punch; }
//////// void show();
//////// friend Power& operator++(Power& op);
//////// friend Power operator++(Power& op,int x);
////////};
////////void Power::show()
////////{
//////// cout << "kick= " << kick << ',' << "punch= " << punch << endl;
////////}
////////Power& operator++(Power& op)
////////{
//////// op.kick++;
//////// op.punch++;
//////// return op;
////////}
////////Power operator++(Power& op,int x)
////////{
//////// Power tmp = op;
//////// op.kick++;
//////// op.punch++;
//////// return tmp;
////////}
////////int main()
////////{
//////// Power a(3,5),b;
//////// b = ++a;
//////// a.show(); b.show();
////////
//////// b= a++;
//////// a.show(); b.show();
////////}
//////
//////
//////#include <iostream>
//////using namespace std;
//////class Power{
//////int kick;
//////int punch;
//////public:
////// Power(int kick,int punch) { this->kick=kick; this->punch=punch; }
////// void show();
////// Power& operator<<(int n);
//////};
//////void Power::show()
//////{
////// cout << "kick= " << kick << ',' << "punch= " << punch << endl;
//////}
//////Power& Power::operator<<(int n)
//////{
////// kick+=n;
////// punch+=n;
////// return *this;
//////}
//////int main()
//////{
////// Power a(1,2);
////// a << 3 << 5 << 6;
////// a.show();
//////}
//////////////////////////////////////////////////1
////#include <iostream>
////using namespace std;
////class Book{
////string title;
////int price,pages;
////public:
//// Book(string title="",int price=0, int pages=0)
//// {
//// this->title=title; this->price=price; this->pages=pages;
//// }
//// void show()
//// {
//// cout << title << ' ' << price << "원 " << pages << " 페이지 " << endl;
//// }
//// string gettitle() { return title; }
//// Book& operator+=(int price1);
//// Book& operator-=(int price2);
////};
////Book& Book::operator+=(int price1)
////{
//// price+=price1;
//// return *this;
////}
////Book& Book::operator-=(int price2)
////{
//// price-=price2;
//// return *this;
////}
////int main()
////{
//// Book a("청춘",20000,300), b("미래",30000,500);
//// a+=500;
//// b-=500;
//// a.show();
//// b.show();
////}
/////////////////////////////////////////////////3
//#include <iostream>
//using namespace std;
//class book{
//string title;
//
//public:
// int pages,price;
// book(string title="",int pages=0,int price=0)
// {
// this->title=title; this->pages=pages; this->price=price;
// }
// void show()
// {
// cout << title << ' ' << price << "원 " << pages << " 페이지 " << endl;
// }
// string gettitle() { return title; }
//// friend book operator!(s);
//
//};
//
//bool operator!(book &op) {
// cout << &op << endl;
// if(op.price==0)
// return true;
// else
// return false;
//}
//
//int main()
//{
// book Book("벼룩시장",0,50);
// cout << &Book << endl;
// if(!Book) cout << "공짜다 " << endl;
//}
/////////////////////////////////////////////////////////5
//#include <iostream>
//using namespace std;
//class color{
//int r,g,b;
//public:
// color(int r=0, int g=0, int b=0 ) { this->r=r; this->g=g; this->b=b; }
// void show() { cout << r << ' ' << g << ' ' << b << endl; }
// color operator+(color op2);
// bool operator==(color &op);
//};
//color color::operator+(color op2)
//{
// color tmp;
// tmp.r=this->r+op2.r;
// tmp.b=this->b+op2.b;
// tmp.g=this->g+op2.g;
// return tmp;
//}
//bool color::operator==(color &op)
//{
// if(r==op.r&&g==op.g&&b==op.b)
// return true;
// else false;
//}
//int main()
//{
// color red(255,0,0), blue(0,0,255),c;
// c= red+ blue;
// c.show();
// color fuchsia(255,0,255);
// if(c==fuchsia)
// cout << "보라색 맞음";
// else
// cout << "보라색 아님";
//}
#include <iostream>
using namespace std;
class Matrix{
int a1,a2,a3,a4;
public:
Matrix(int a1=0,int a2=0,int a3=0,int a4=0)
{
this->a1=a1; this->a2=a2; this->a3=a3; this->a4=a4;
}
void show();
Matrix& operator<<(Matrix &op,int x1);
Matrix& operator>>(Matrix &op,int y1);
};
void Matrix::show()
{
cout << "Matrix= { " << a1 << ' ' << a2 << ' ' << a3 << ' ' << a4 << ' ' << "}" << endl;
}
Matrix& Matrix::operator<<(Matrix &op,int x1)
{
x1[0]==op.a1;
x1[1]==op.a2;
x1[2]==op.a3;
x1[3]==op.a4;
return *this;
}
Matrix& Matrix::operator>>(Matrix &op,int y1)
{
op.a1=y1[0];
op.a2=y1[1];
op.a3=y1[2];
op.a4=y1[3];
return *this;
}
int main()
{
Matrix a(4,3,2,1),b;
int x[4],y[4] = {1,2,3,4};
a >> x;
b << y;
for(int i=0;i<4; i++)
{
cout << x[i] << ' ';
}
cout << endl;
b.show();
}



