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
5 months agoCordelia
5 months agoGalen
6 months agoTyisha
6 months agoJesusita
6 months agoCorrina
6 months agoTora
6 months agoCherry
6 months agoJamal
6 months agoKayleigh
6 months agoCatarina
6 months ago