Home > Back-end >  Help c builder DynamicArray two-dimensional dynamic array error as a function parameter
Help c builder DynamicArray two-dimensional dynamic array error as a function parameter

Time:09-25

The function definitions
Void Fitness (DynamicArray Chorm, float * fitness, float * volume, float * value, float knapsack, int objectNum, int popSize)
{
Chorm. Length=popSize;
for (int i=0; i{
Float sum=0;
For (int j=0; J{
The sum +=chorm [I] [j] * (volume [j]);
}

}
Function call void Fitness (chrom, Fitness, objectVolume objectValue, knapsackVolume, objectNum, popSize);
The chrom is declared in the header file DynamicArray< dynamic array; DynamicArray Chrom;

Error [c + + Error] Unit1. CPP (250) : E2451 Undefined symbol 'chrom'

CodePudding user response:

Oh, chrom / chorm try again and again, can use!
  • Related