Add inside your if statement :
if
cout<< "adding:" <<msg[count] << " for i=" << i<< endl;
And it should be clear for you why it doesn't work.
Loading collection data...
Add inside your
if
statement :And it should be clear for you why it doesn't work.