Write a C++ Program demonstrating Operator Overloading demo2

#include
#include

const size = 3;

class vector
{
int v[size];
public:
vector();
vector (int *x);
friend vector operator * (int a,vector b);
friend vector operator * (vector b,int a);
friend istream & operator >> (istream &,vector &);
friend ostream & operator << (ostream &amp;,vector &); }; vector :: vector() { for(int i=0;i> (istream & din,vector & b)
{
for(int i=0;i>b.v[i];
return(din);
}

ostream & operator << (ostream &amp; dout,vector & b) { dout<<"(";//<<<", "<<<")"; return(dout); } int x[size] = {2,4,6}; void main() { clrscr(); vector m; vector n=x; cout<<"Enter elements of vector m \n"; cin>>m;
cout<
cout<<"m="<<

vector p,q;
p=2*m;
q=n*2;

cout<
cout<<"p="<

<
cout<<"q="<<
getch();
}