CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    How to clear Vector of arrays???

    I have a vector data that has arrays, I want to clear it when I test it
    if it's not empty this is what I did :

    if(!data.isEmpty()){
    for(int i = 0; i < V_size; i++)
    data.setElementAt(null,i); }



    But it does not work, please help


  2. #2
    Join Date
    Sep 1999
    Location
    Madurai , TamilNadu , INDIA
    Posts
    1,024

    Re: How to clear Vector of arrays???


    how about Vector.removeAllElements() ?


  3. #3
    Guest

    Re: How to clear Vector of arrays???

    Simple solution.

    data.clear();

    This will clear the vector for you


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured