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_iterato r<string> i_it(ifs) ;
copy(i_it.begin (), i_it.end(),ostr eam_iterator<st ring>(cout,"\n" )) ;
}
_______________ ____________
Complier error -
(SunOS 5.8 , g++ )
13 : no matching function for call to `istream_iterat or<basic_stri
ng<char,string_ char_traits<cha r>,__default_al loc_template<fa lse,0>[color=blue]
>,int>::begin ()'[/color]
13: no matching function for call to `istream_iterat or<basic_stri
ng<char,string_ char_traits<cha r>,__default_al loc_template<fa lse,0>[color=blue]
>,int>::end ()'[/color]
_______________ _______
regards,
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
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_iterato r<string> i_it(ifs) ;
copy(i_it.begin (), i_it.end(),ostr eam_iterator<st ring>(cout,"\n" )) ;
}
_______________ ____________
Complier error -
(SunOS 5.8 , g++ )
13 : no matching function for call to `istream_iterat or<basic_stri
ng<char,string_ char_traits<cha r>,__default_al loc_template<fa lse,0>[color=blue]
>,int>::begin ()'[/color]
13: no matching function for call to `istream_iterat or<basic_stri
ng<char,string_ char_traits<cha r>,__default_al loc_template<fa lse,0>[color=blue]
>,int>::end ()'[/color]
_______________ _______
regards,
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Comment