May 16, 2021, 12:33:10 AM

News : Linux Help Community Forum..

Author Topic: No matching Call Error  (Read 3577 times)

Offline a_mlt1

  • New Member
  • Posts: 3
No matching Call Error
« on: June 22, 2004, 09:30:58 AM »

Following code is giving compilation error in g++.

Code: [Select]
using namespace std;

template<typename T>
struct subvector_traits
typedef T* iterator;

template<typename T>
class subvector

typedef typename subvector_traits<T>::iterator iterator;
void initialize(iterator start,iterator end)

iterator m_pstart;
iterator m_pend;

int main()
subvector<unsigned int> cells;
static vector<unsigned int> m_nMembercells; cells.initialize(m_nMembercells.begin(),m_nMembercells.begin());
return 0;

Error Message:- >

no matching function for call to `subvector<unsigned int>:: initialize(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > >, __gnu_cxx::__normal_iterator<unsigned
int*, std::vector<unsigned int, std::allocator<unsigned int> > > )'
initialize.cpp:20: candidates are: void subvector<T>::initialize(subvector_traits<T>::iterator,
subvector_traits<T>::iterator) [with T = unsigned int]
initialize.cpp:37:2: warning: no newline at end of file

If anyone has some idea then please help
Thank you! in advance