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< int main() { int t1[]={3,2,4,1,5}; int t2[]={5,6,8,2,1}; vector sort(t1, t1+5); sort(t2, t2+5); set_union(t1,t1+5,t2,t2+5,v1.begin()); for_each(v1.begin(), v1.end(), Out return 0; } Program outputs:
Berry
3 months agoRyann
3 months agoElvera
3 months agoLavonna
2 months agoElmira
2 months agoJaleesa
2 months agoZack
2 months agoKimberely
3 months agoEleonora
2 months agoLeota
2 months agoLaura
2 months agoLacey
4 months agoCandida
2 months agoHershel
3 months agoDorethea
3 months agoArthur
4 months agoRanee
4 months agoKiera
4 months agoJillian
4 months agoLynna
4 months agoJillian
5 months ago