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