What happens when you attempt to compile and run the following code?
#include
#include
#include
#include
using namespace std;
template
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out<
int main() {
int t[]={3,2,4,1,5,6,10,8,7,9};
vector
for_each(v1.begin(), v1.end(), bind1st(plus
for_each(v1.rbegin(), v1.rend(), Out
return 0;
}
Program outputs:
Avery
27 days agoRikki
30 days agoTamekia
20 hours agoMozell
1 months agoOcie
19 hours agoRebecka
1 months agoJose
28 days agoDulce
2 months agoAnnmarie
22 days agoLura
27 days agoMarti
2 months agoAshlyn
2 months agoFranklyn
2 months ago