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:
Carin
28 days agoBettina
12 days agoMagda
29 days agoJonell
1 months agoBarbra
4 days agoNina
9 days agoRonnie
15 days agoDominic
1 months agoRosendo
1 months agoTheola
7 days agoCarolynn
1 months agoEllsworth
16 days agoRichelle
21 days agoMerilyn
1 months agoBarb
2 months agoJunita
2 months agoDorothy
2 months ago