What happens when you attempt to compile and run the following code? #include #include #include using namespace std; templatestruct Out { ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out< d1(t, t+10); sort(d1.begin(), d1.end()); deque::iterator it = upper_bound(d1.begin(), d1.end(), 4); for_each(it, d1.end(), Out(cout));cout<
What happens when you attempt to compile and run the following code? #include using namespace std; int main () { float f1 = 10.0; float f2 = 10.123; cout<
What happens when you attempt to compile and run the following code? #include #include using namespace std; template void print(T start, T end) { while (start != end) { std::cout << *start << " "; start++; } } int main() { int t1[] ={ 1, 7, 8, 4, 5 }; list l1(t1, t1 + 5); int t2[] ={ 3, 2, 6, 9, 0 }; list l2(t2, t2 + 5); l1.sort(); list::iterator it = l2.begin(); it++; it++;l1.splice(l1.end(),l2, it, l2.end()); print(l1.begin(), l1.end()); cout<<"Size:"<