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