A
Aman
Hi,
could you please tell me why the following program gives a compilation
error ? what does this error mean ?
note also that when i derefernce the iterator , the contents are
displayed.
int main()
{
ifstream ifs("file") ;
istream_iterator<string> i_it(ifs) ;
copy(i_it.begin(), i_it.end(),ostream_iterator<string>(cout,"\n")) ;
}
___________________________
Complier error -
(SunOS 5.8 , g++ )
13 : no matching function for call to `istream_iterator<basic_stri
regards,
could you please tell me why the following program gives a compilation
error ? what does this error mean ?
note also that when i derefernce the iterator , the contents are
displayed.
int main()
{
ifstream ifs("file") ;
istream_iterator<string> i_it(ifs) ;
copy(i_it.begin(), i_it.end(),ostream_iterator<string>(cout,"\n")) ;
}
___________________________
Complier error -
(SunOS 5.8 , g++ )
13 : no matching function for call to `istream_iterator<basic_stri
13: no matching function for call to `istream_iterator<basic_string said:,int>::begin ()'
______________________ng said:,int>::end ()'
regards,