Once I have this working with your help, I want to include the *InVolume pointer which I’m supposing can just be implemented in my struct in the way that I have commented out at the moment.
The first error is a generic error saying that some symbols (1, in this case) aren’t resolved.
The second error is likely the important one. It indicates that the constructor for the NodePriority structure isn’t resolved. This is usually due to not defining the constructor in the *.cpp file. Another common cause is a typo in the name of (or less fequently the arguments to) the constructor. If you’ve already double-checked those issues, could you include the definition you have?
Oh right! In that case I think I’ve just not fundamentally understood the linked answer. I assumed that the constructor had been defined fully in line 4 of my header file. I’ll go away and learn more about structs
As my struct is contained within the class header file, I’m guessing I’ll need to define the constructor in the .cpp file something like
// -- Construction
TPriorityQueue<UTile*> Frontier;
// -- Adding elements: (element, priority)
Frontier.Push(TargetTile, 0.0f);
Frontier.Push(Grid->At(10, 16), 8.0f);
Frontier.Push(StartTile, 1000.0f);
// -- Iteration
while (!Frontier.IsEmpty()) {
UTile* Current = Frontier.Pop(); // Removes it from the top of the heap
Current->DoMagic();
}