please tell me how to remove the error of iota undeclared
as shown in attachment file

template < typename ITERATOR, typename T >
void iota( ITERATOR begin, ITERATOR end, T value ) ;

is part of (SGI) STL; it is not part of the standard C++ library.

Unless you are using SGI STL (or one of its derivatives), it is likely that this function is not there at all. It is trivial to implement it on your own, though:

template < typename ITERATOR, typename T >
inline void iota( ITERATOR begin, ITERATOR end, T value )
{
   for( ; begin != end ; ++begin, ++value ) *begin = value ;
}

it is not part of the standard C++ library

It's available in C++11 though.

Ah! Didn't know that.

Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.