What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
void print(int v) { cout< struct Sequence { int start; Sequence(int start):start(start){} int operator()() { return 10*(1+(start++ %3)); } }; int main() { vector generate_n(v1.begin(), 10, Sequence(1)); remove(v1.begin(), v1.end(), 10); for_each(v1.begin(), v1.end(), print);cout< return 0; } Program outputs:
Reita
10 months agoCordelia
10 months agoGalen
10 months agoTyisha
10 months agoJesusita
11 months agoCorrina
11 months agoTora
11 months agoCherry
11 months agoJamal
11 months agoKayleigh
11 months agoCatarina
11 months ago