是否可以在opencv中输出结果之前放置链表索引? 例如,我有代码
for( ; i!= 0; i= i->h_next )
{
printf("Index number = %d Area = %.2f \n",n, area);
}
现在,我的问题是,如何打印这个索引号?由于i
的值不在1,2,3等等......
答案 0 :(得分:2)
也许试试:
int cnt = 0;
for ( .. ) {
printf("%d\n", cnt++);
}