Я попытался создать массив объекта в C++, но я получу кое-что из странной ошибки, и я не знаю почему.Somekind ошибки при попытке создать массив obejct
Complex ** tab; //class field
matrix::matrix(int x, int y) //construktor
{
tab = new Complex * [x];
for (int i = 0; i < x; i ++)
{
tab[i] = new Complex[y];
}
Ошибки:
1> matrix.obj: LNK2019 ошибка: неразрешенный внешний символ "общественности: __thiscall комплекс :: Complex (аннулируются)" (?? 0Complex @@ QAE @ XZ) ссылка в функции "public: __thiscall matrix :: matrix (int, int)" (?? 0matrix @@ QAE @ HH @ Z)
1> matrix.obj: ошибка LNK2019: неразрешенный внешний символ "public: __thiscall Complex: : ~ Complex (void) "(?? 1Complex @@ QAE @ XZ), на который ссылается функция« public: __thiscall matrix :: matrix (int, int) »(?? 0matrix @@ QAE @ HH @ Z)
Что не так?
[См этот вопрос] (http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i- исправить), возможно [этот ответ] (http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix/12574407 # 12574407) или [этот] (http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix/12574400 # 12574400). – chris
Какой-то странный комментарий. –