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
2 months agoBettina
1 months agoMagda
2 months agoJonell
2 months agoBarbra
1 months agoNina
1 months agoRonnie
2 months agoDominic
2 months agoRosendo
2 months agoMila
26 days agoChristoper
28 days agoLashunda
29 days agoTheola
1 months agoCarolynn
2 months agoEllsworth
2 months agoRichelle
2 months agoMerilyn
2 months agoBarb
3 months agoJunita
3 months agoDorothy
3 months ago