In hamming.cpp:
I define a function
int distance(vector<int> v1, vector<int> v2);
We propate two vector to this function and return hamming distance
In counting.cpp:
I write~~
vector < vector < int> > L10;
........
for (int m5=0; m5 < L10.size(); m5++)
{
int d2 = distance ( L10[m5],temp);
We transfet L10[m5] and temp(type is: vector < int> ) to this
function distance
However, error occurs when I compile using Dev-C++
The error seems like it must use iterator.
How should I fix the program ?
Thanks a lot.
The error meaasge is as below~~
error occut in this row (int d2..)
In instantiation of `std::iterator_traits<std::vector<int,
std::allocator<int
':
31 C:\Dev-Cpp\code\counting.cpp instantiated from here
129 C:\Dev-Cpp\include\c++\3.4.2\bits\stl_iterator_base_types .h no
type
named `iterator_category' in `class std::vector<int,
std::allocator<int> >'
In stl_iterator_base_types.h, the content of 129 line is ~~
typedef typename _Iterator::iterator_category iterator_category;