S
slurper
list<int> jobs
jobs.pushback(1);
jobs.pushback(2);
for ( it=jobs.begin; it!=jobs.end; it++ ) {
list <int> new_list(jobs)
do something;
new_list.push_back(3)
}
the list declaration inside the loop: will the constructor be called each
time the loop is entered?
in other words: will the new_list always be reinitialized to the jobs list?
tx
jobs.pushback(1);
jobs.pushback(2);
for ( it=jobs.begin; it!=jobs.end; it++ ) {
list <int> new_list(jobs)
do something;
new_list.push_back(3)
}
the list declaration inside the loop: will the constructor be called each
time the loop is entered?
in other words: will the new_list always be reinitialized to the jobs list?
tx