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
4 months agoBettina
4 months agoMagda
4 months agoJonell
4 months agoBarbra
3 months agoNina
3 months agoRonnie
4 months agoDominic
4 months agoRosendo
4 months agoMila
3 months agoChristoper
3 months agoLashunda
3 months agoTheola
3 months agoCarolynn
5 months agoEllsworth
4 months agoRichelle
4 months agoMerilyn
4 months agoBarb
5 months agoJunita
5 months agoDorothy
5 months ago