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
7 months agoStephaine
7 months agoKip
7 months agoJoanne
7 months agoEsteban
8 months agoRupert
8 months agoJoaquin
8 months agoColette
8 months agoMichel
8 months agoWayne
8 months agoSarina
8 months agoRolande
8 months agoMelissia
8 months agoDusti
1 year agoRoosevelt
1 year agoAnnmarie
1 year agoMyrtie
11 months agoGladys
12 months agoMelina
12 months agoLouisa
1 year agoRoselle
1 year agoOmega
11 months agoTeri
11 months agoCorinne
1 year agoWilliam
12 months agoTess
1 year agoAnnamae
1 year agoKerry
1 year agoCarey
1 year agoKerry
1 year ago