User profile: fabrocket

User info
User name:fabrocket
Bio:#include <cstdlib>
#include <iostream>

using namespace std;

class CVector {
public:
int x,y;
CVector () {};
CVector (int a, int b);
CVector operator + (CVector param);
};



CVector::CVector (int a, int b) { x = a; y = b; }
CVector CVector::operator+ (CVector param)
{
return CVector(param.x+x,param.y+y);
}



int main ()
{
CVector a (7,1), b (1,2), c;
c = a + b;
cout << c.x << "," << c.y;
return 0;
}
History
Joined:
Number of posts:2
Latest posts:

Class Funcionario (.h)
#include <iostream> #include <string> using namespace std; class Funcionario { priva...

files
#include <cstdlib> #include <iostream> #include <fstream> #include <string> using namespace st...

This user does not accept Private Messages

User: fabrocket

  • Public profile