Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;
  4.  
  5. class Osztaly {
  6.     int t[5];
  7.  
  8. public:
  9.     Osztaly(int *tomb) {
  10.         for (int i = 0; i < 5; i++) {
  11.             t[i] = tomb[i];
  12.         }
  13.     }
  14.  
  15.     const Osztaly& operator=(const Osztaly& theOther) {
  16.         for(int i=0;i<5;i++){
  17.             t[i] = t[i] * theOther.t[i];
  18.             cout << t[i] << endl;
  19.         }      
  20.         return *this;
  21.     }
  22.  
  23.  
  24.  
  25. };
  26.  
  27. int main() {
  28.  
  29.     //tesztelés
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement