在')'令牌之前预期的主要表达

时间:2013-03-07 18:35:03

标签: c++ image-processing error-handling compiler-errors linked-list

每当我尝试编译时,我的调试器就会出现该错误(在''令牌之前的预期的primary-expression)。这是错误的代码。

#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);
 }
}

有人知道C链表吗?还是错误处理?请帮忙。谢谢。

1 个答案:

答案 0 :(得分:3)

排队:

  

ListName.AddToTail(结构);

结构不是对象的数据类型。

也许你打算写下这样的东西:

  

ListName.AddToTail(LISTNAME);

编辑:另外,您在错误的上下文中使用调试器,C链接列表和错误处理这两个术语。请参阅一些优秀的C ++书籍:The Definitive C++ Book Guide and List

相关问题