Q. vector and prt assingment error ! 
Author Message
 Q. vector and prt assingment error !

I have 3 vector... temp contain 0 to 99
total contain the same values of temp.
temp is now a copy of total.

and in final I add the values of temp
and I want to see to values of final is a Listbox...and final[i] return
always the same value. WHy ?

int i;
for(i=0;i<100;i++)
{
    Form1->temp.insert(Form1->temp.begin(),i);

Quote:
}

Form1->total.insert(Form1->total.begin(),Form1->temp.begin(),Form1->temp.end());

Form1->temp=Form1->total;
Form1->total.clear();

for(i=0;i<100;i++)
{
  Form1->final.insert(Form1->final.begin(),Form1->temp[i]);
  ListBox1->Items->Add(Form1->temp[i]); // return 99,98,97,96...
  ListBox2->Items->Add(Form1->final[i]); //return 99,99,99,99,99,99....

Quote:
}



Tue, 01 May 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. vector and ptr assingment problems

2. how to obtain prt queue status in AIX

3. HELP IN WRITING MY FIRST PROGRAM ASSINGMENT

4. HELP IN WRITING MY FIRST PROGRAM ASSINGMENT

5. Vector Iterator Error in VC7

6. vector<string> causes LNK2005/4006 errors

7. try to declare a vector cause an error?

8. STL vector and pair gives new error with SP3

9. VC++ 5.0 std::vector error: pointer to nested class

10. Syntax Error using vector const_reverse_iterator

11. How to change from vector to list without errors for partial_sort() with predicate

12. erase(reverse iterator) on vector, compilation error in vc6 with dinkumware

 

 
Powered by phpBB® Forum Software