链接器返回“重定位在符号索引处有无效的符号...”
我正在Ubuntu上尝试一些代码。我正在尝试运行以下代码 #include <cstdlib> #include <cmath> #include <ctime> #include "random.h" using namespace std; /* Function prototype! */ void initRandomSeed(); int randomInteger(int low,int high){ initRandomSeed(); double d= rand()/(double(RAND_MAX)+1); double s= d*(double(high)-low+1); return int(floor(low)+s); } double randomReal(int low,int high){ initRandomSeed(); double d=rand()/(double(RAND_MAX)+1); double s=d*(double(high)-low+1); return low+s; } bool randomChance(double p){ initRandomSeed(); return randomReal(0,1)<p; …