Error from iterating list

Hi,

I am using iterator to go through the list std::list<cv::Mat>.

Terminal gives me erros as following:

error: conversion from 'std::list<cv::Mat>::iterator {aka std::_List_iterator<cv::Mat>}' to non-scalar type 'std::list<cv::Mat*>::iterator {aka std::_List_iterator<cv::Mat*>}' requested for(std::list<cv::Mat*>::iterator it=obj_rois.begin(); it != obj_rois.end(); ++it)
^
1
2
3
4
5
6
  std::list<cv::Mat> obj_rois;
  // processing and push_back...
  for(std::list<cv::Mat*>::iterator it=obj_rois.begin();it!=obj_rois.end();++it)
        {
            //...
        }


Thank you for help.

Best,
waschbaer
Mat on line 1, Mat* on line 3 of your code snippet
Thank you.
Topic archived. No new replies allowed.