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:
Ming
8 months agoEmiko
8 months agoVirgie
8 months agoHelga
7 months agoMarion
8 months agoHelga
8 months agoRutha
8 months agoRenea
8 months agoTanja
8 months agoHyman
8 months agoHannah
9 months agoLauran
8 months agoKindra
8 months agoNicholle
8 months agoLeigha
8 months agoNikita
8 months agoLavonna
8 months agoAllene
9 months ago