-5

my debugger comes up with that error (expected primary-expression before ')' token ) whenever I try to compile. Here's the bit of code with the error.

#define threshold 40 //threshold intensity

using namespace std;
using namespace cimg_library;

void RegionGrow (CLinkedList<struct structure> &ListName, CByteImage &Img, uint32_t uRow, uint32_t uCol)
{
 if (Img.Element (uRow+1, uCol) > threshold)
 {
  ListName.AddToTail(structure);
  Img.Element (uRow+1, uCol) = 0;
  RegionGrow (ListName, Img, uRow+1, uCol);
 }
}

Anyone know about C linked list? or error-handling? Please help. Thanks.

1 Answers1

3

In line:

ListName.AddToTail(structure);

structure is a data type not an object.

Perhaps you intended to write something like:

ListName.AddToTail(ListName);

EDIT: also, you are using the terms Debugger, C Linked List and Error handling in wrong context. Refer to some good C++ book: The Definitive C++ Book Guide and List

Community
  • 1
  • 1
shanxS
  • 41
  • 5