Which method added to class B at the marked spot will allow the code below to compile? Choose
all possible solutions.
#include
#include
#include
using namespace std;
class B { int val;
public:
B(int v):val(v){}
int getV() const {return val;}
/* Insert Code Here */
};
ostream & operator <<(ostream & out, const B & v) { out< template ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out< int main() { int t[]={8, 10, 5, 1, 4, 6, 2, 7, 9, 3}; vector v1(t, t+10); sort(v1.begin(), v1.end(), greater()); for_each(v1.begin(), v1.end(), Out(cout));cout< return 0; }
Daisy
4 months agoStephaine
4 months agoKip
4 months agoJoanne
4 months agoEsteban
4 months agoRupert
5 months agoJoaquin
5 months agoColette
5 months agoMichel
5 months agoWayne
5 months agoSarina
5 months agoRolande
5 months agoMelissia
5 months agoDusti
9 months agoRoosevelt
9 months agoAnnmarie
9 months agoMyrtie
8 months agoGladys
8 months agoMelina
9 months agoLouisa
9 months agoRoselle
10 months agoOmega
8 months agoTeri
8 months agoCorinne
10 months agoWilliam
9 months agoTess
9 months agoAnnamae
10 months agoKerry
11 months agoCarey
11 months agoKerry
11 months ago