|
From: HenkZ on 20 Apr 2008 13:59 In my book there is an example with an ostream_iterator like this: (it should bring a[] on the screen) -------- #include <iostream> #include <algorithm> //#include <ostream> didn't help using namespace std; int main(){ int a[] = {22, 33, 44, 55, 66, 77, 88, 99}; copy(a, a+6, ostream_iterator<int>(cout, " ")); return 0; } -------- The compiler says: ostream_iterator is not declared Do i miss something in the include-rules?
From: "sk_usenet" sometechyguy at gmail dot on 20 Apr 2008 14:50 "HenkZ" <hzeldenrust(a)hccnet.nl> wrote in message > In my book there is an example with an > ostream_iterator like this: > (it should bring a[] on the screen) > -------- > > #include <iostream> > #include <algorithm> > //#include <ostream> didn't help #include <iterator> > using namespace std; > > int main(){ > int a[] = {22, 33, 44, 55, 66, 77, 88, 99}; > copy(a, a+6, ostream_iterator<int>(cout, " ")); > return 0; > } > > -------- > The compiler says: ostream_iterator is not declared > Do i miss something in the include-rules? You can look at standard library documentation at http://www.dinkumware.com/ .. -- http://techytalk.googlepages.com
From: HenkZ on 20 Apr 2008 16:56 "sk_usenet" <sometechyguy at gmail dot com> schreef in bericht news:480b908a$0$90262$14726298(a)news.sunsite.dk... > > "HenkZ" <hzeldenrust(a)hccnet.nl> wrote in message >> In my book there is an example with an >> ostream_iterator like this: >> (it should bring a[] on the screen) >> -------- >> >> #include <iostream> >> #include <algorithm> >> //#include <ostream> didn't help > > #include <iterator> > >> using namespace std; >> >> int main(){ >> int a[] = {22, 33, 44, 55, 66, 77, 88, 99}; >> copy(a, a+6, ostream_iterator<int>(cout, " ")); >> return 0; >> } >> >> -------- >> The compiler says: ostream_iterator is not declared >> Do i miss something in the include-rules? > > You can look at standard library documentation at > http://www.dinkumware.com/ . > > -- > http://techytalk.googlepages.com > i included and... all is OK. Thanks
|
Pages: 1 Prev: map of objects [ was map of classes] Next: initializing array with list |