VectorDouble copy and operator problem


public:
friend bool &operator == (const VectorDouble &v4,VectorDouble &v3 );
VectorDouble();
VectorDouble(int numOfElements);
VectorDouble(const VectorDouble& v3);
~VectorDouble();
bool operator = (const VectorDouble &v4);
void push_back(double d);
void push_back();
int capacity();
int size();
void reserve(int n);
void reserver();
void resize(int n, double v);

double value_at(int i);
double value_at();
void change_value_at(double d, int i);

private:
void fatalError();
void doubleSize();
double* vector;
int maxCount;
int count;

}
hi i have a school assignment of duplicating Vector class using Vector Double i have managed so far to do everything except few thinks....
i did not include my main program, anyway i'm having problem with the operators i'm suppose to make 1 friend equal operator == and one member operator = .Also

i don't know how to make the VectorDouble(const VectorDouble& v3); it should copy v3 to v2
i would love any suggestion and help because i'm lost at this point :D
Your return and argument types are incorrect. I would suggest taking a look at string operator function prototypes as an example.

http://www.cplusplus.com/reference/string/operators/
http://www.cplusplus.com/reference/string/string/operator=/

Topic archived. No new replies allowed.