-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwector.h
More file actions
39 lines (31 loc) · 837 Bytes
/
Copy pathwector.h
File metadata and controls
39 lines (31 loc) · 837 Bytes
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
35
36
37
38
39
#ifndef WECTOR
#define WECTOR
#include <iostream>
class wektor
{
int *fields;
int size;
public:
//constructors
wektor();
wektor(int nsize);
wektor(const wektor &v);
//destructor
~wektor();
//overloadnig operators
wektor operator+(const wektor &v);
wektor operator-(const wektor &v);
wektor operator*(const int n);
wektor operator*(const wektor &v);
wektor &operator=(const wektor &v);
wektor &operator+=(const wektor &v);
wektor &operator-=(const wektor &v);
wektor &operator*=(const int &n);
wektor &operator*=(const wektor &v); //do zrobienia
friend std::istream& operator>>(std::istream &in, wektor &v);
friend std::ostream& operator<<(std::ostream &out, wektor &v);
int operator[](const int &index);
bool operator==(const wektor &v);
bool operator!=(const wektor &v);
};
#endif