What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
template
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out< struct Add { int operator()(int & a, int & b) { return a+b; } }; int main() { int t[]={1,2,3,4,5,6,7,8,9,10}; vector vector transform(v1.begin(), v1.end(), v2.begin(), bind1st(1,Add())); for_each(v2.rbegin(), v2.rend(), Out return 0; } Program outputs:
Jamal
4 months agoJoseph
3 months agoHaydee
3 months agoErinn
3 months agoStevie
4 months agoGlory
3 months agoGennie
3 months agoFletcher
3 months agoWade
4 months agoKanisha
4 months agoAdolph
3 months agoRoselle
3 months agoLakeesha
3 months agoAdolph
4 months agoMaxima
5 months agoKatie
3 months agoJacquline
4 months agoTamesha
4 months agoZona
4 months agoGoldie
4 months agoQuentin
4 months agoNydia
5 months agoCecil
5 months agoCecil
5 months agoTina
5 months agoCatalina
5 months ago