definition de type non reconnu par g++ ou erreur?
Bonjour,
Jusqu a present, mon code compilé sous visual sans souci... le passage a g++ est tout autre. J aurais donc besoin de vos lumieres pour savoir si l erreur vient de moins et du laxisme de Visual.
Voila donc une partie de mon .h:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
typedef techsoft::matrix<double> dMatrix;
typedef std::valarray<double> dVector;
class Tensor
{
public:
Tensor ();
Tensor (dMatrix &val, int x, int y, int z);
(...)
private:
int _x, _y, _z;
dMatrix _val;
(...)
}; |
La partie concernée de mon .cpp
Code:
1 2 3 4 5 6 7
|
Tensor
Tensor::operator+ (const Tensor & T)
{
Tensor *res = new Tensor (_val + T._val, _x, _y, _z);
return *res;
} |
et l'erreur rejetée:
Code:
1 2 3 4 5 6
|
Tensor.cpp: In member function `Tensor Tensor::operator+(const Tensor&)':
Tensor.cpp:28: error: no matching function for call to `Tensor::Tensor(techsoft::matrix<double>, int&, int&, int&)'
Tensor.h:16: note: candidates are: Tensor::Tensor(const Tensor&)
Tensor.cpp:14: note: Tensor::Tensor(dMatrix&, int, int, int)
Tensor.cpp:3: note: Tensor::Tensor() |
8O