我正在将一个动态整数数组传递给一个函数,但我无法让它工作。
int * tempP1;
tempP1 = new int [numP1+1];
称呼:
Polynomial P1(numP1, tempP1);
原型:
Polynomial(int tempNum, int * tempPoly);
功能:
Polynomial::Polynomial(tempNum, int *tempPoly)
错误:
Undefined symbols for architecture x86_64:
"Polynomial::Polynomial(int, int*)", referenced from:
_main in ccDOuaGg.o
"Polynomial::~Polynomial()", referenced from:
_main in ccDOuaGg.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
任何帮助将非常感激 :)