Home > Back-end >  The for loop to create containers, container is the number of repeat? Every creation will overwrite
The for loop to create containers, container is the number of repeat? Every creation will overwrite

Time:12-21

The for loop to create containers, container is the number of repeat?

Such as cycle create five deque container, every creation will overwrite the original containers? If there is no cover, the container name is repeated?

Void setscore (vector & V)
{
For (vector : : iterator it=what exactly do v.begin (); it !=v.e nd (); It++)
{
Deque d;
for (int i=0; I & lt; 10; I++)
{
Int score=rand () % 41 + 60;
D.p ush_back (score);
}
Sort (db do v.begin (), d.e nd ());
D.p op_front ();
D.p op_back ();
int sum=0;
For (deque : : iterator dit=db do v.begin (); Dit!=d.e nd (); Dit++)
{
The sum +=* dit.
}
Cout & lt; Int aver=sum/d.s considering ();
It - & gt; M_score=aver;
Cout & lt; <"Name:" & lt; Cout & lt; }
  • Related