【问题标题】:I have 3 errors:expected a ")" , expected an expression, argument of type long is incompatible with parameter of type U32我有 3 个错误:预期为 ")" ,预期为表达式,long 类型的参数与 U32 类型的参数不兼容
【发布时间】:2013-12-12 08:28:06
【问题描述】:
/*******************************************************************/
#define cdisp(a, src, col);
#define FL_wpset_U8 256;
/*******************************************************************/
void main(void)
{
    int posx= 100, posy=100, dx=300, dy=300; 
    long length=5000; 
    int threshold=125; 
    int lx, x0=0, y0=0;
    int res1=0,res2=0, *rlc, *input, i;
    long dest1,dest2,desttemp, addr;
    char c;
    image Area, Ovl;





    ScrSetLogPage((int)ScrGetPhysPage);
    OvlSetLogPage((int)OvlGetPhysPage);

    OvlClearAll;

    set_ovlmask(255);

    ImageAssign(&Area,ScrByteAddr(posx,posy), dx, dy, ScrGetPitch);

    ImageAssign(&Ovl,OvlBitAddr(posx,posy), dx, dy, OvlGetPitch);


    frameo(&Ovl);




    vmode(vmOvlLive);
    /* follow contour */
    dest1=DRAMWordMalloc((long)length);
    dest2=DRAMWordMalloc((long)length);

2 个错误位于 frameo(&Ovl) 行中(应为 ")" ,应为表达式)。

desttemp = dest1;
res1 = contour8(&Area,x0,y0,~2,threshold,length,&desttemp);

最后一个错误在最后一行(long 类型的参数与 U32 类型的参数不兼容)。 contour8 的函数签名是I32 contour8(image *a, I32 x0, I32 y0, I32 dir, I32 thr, U32 lng, U32 **dst)。 不知道怎么解决,先谢谢了。

【问题讨论】:

  • main 必须具有 int 返回类型。至于你的最后一个错误,单指针不是双指针。
  • 请注意,报告缺失 ) 的位置在错误所在的位置之后。
  • 什么是OvlClearAll;? C 中的函数调用必须有()。如果你省略了(),你会得到一个函数指针。

标签: c++ c opencv


【解决方案1】:

您几乎肯定不希望在#define 行的末尾使用这些分号。 使用它们很可能会将语句分隔符注入到表达式的中间。

【讨论】:

    【解决方案2】:

    您应该从定义中删除;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      相关资源
      最近更新 更多