My problem is that I cannot define a class, using a move konstructor, because my compiler cannot recognize &&s.
This example class cannot be compiled:
class FloatVek
{
private:
float * vekPtr;
int max;
int anz;
void expand(int);
public:
FloatVek( int n = 256);
FloatVek( int n, float wert);
FloatVek(const FloatVek& a);
~FloatVek() {delete[] vekPtr;}
int length() const {return anz;}
bool append(float);
float& operator[](int i);
float operator[](int i) const;
FloatVek(FloatVek&& a); problem here
FloatVek& operator=(FloatVek&& a);and here
FloatVek& operator+=(const FloatVek& src);
};
I am using the TDM-GCC 4.9.2 compiler supplied with Dev c++, however it looks like it does not supports C++11 syntax.
Any help how could I overcome the issue?
Thank you in advance!
Last edit: Kalman Roth 2017-08-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone!
My problem is that I cannot define a class, using a move konstructor, because my compiler cannot recognize &&s.
This example class cannot be compiled:
class FloatVek
{
private:
float * vekPtr;
int max;
int anz;
void expand(int);
public:
FloatVek( int n = 256);
FloatVek( int n, float wert);
FloatVek(const FloatVek& a);
~FloatVek() {delete[] vekPtr;}
};
I am using the TDM-GCC 4.9.2 compiler supplied with Dev c++, however it looks like it does not supports C++11 syntax.
Any help how could I overcome the issue?
Thank you in advance!
Last edit: Kalman Roth 2017-08-20