-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vectors.h
34 lines (27 loc) · 875 Bytes
/
Vectors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*@Author
* Student Name: Esin Ece Aydın
* Student ID: 150160151
* Date: 23.03.2019
*/
//Decleration of Vectors
#ifndef _vectors_
#define _vectors_
#include<iostream>
class Vectors{
int numberV;
int *value;
int sizeV;
public:
Vectors(int = 0); // constructor with default parameters
Vectors(int, int *); //constructor with parameters
~Vectors(); //destructor
int getsize() const { // getter method to get sizeV
return sizeV;
}
void operator+(const Vectors&) const;
void operator*(const Vectors&) const;
void operator*(const int) const;
friend std::ostream & operator << (std::ostream &out, const Vectors &v);//friend function for Vectors class
//it can access all members of this class.
};
#endif