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

    Vectors transfer...Please help, Thank you

    Hi, I have a vector V that has [200,20,24,25] and a rowdata vect that has [Alg1,Alg2], I want to create a data Vdata vector that gets data from
    V and rowdata , I am comfused I want thing after word to be in the table like this :
    -----------------------------------------
    Column0 Column1 Column2
    -----------------------------------------
    Ag1 200 20
    -----------------------------------------
    Alg2 24 2
    ----------------------------------------


  2. #2
    Join Date
    Dec 1999
    Location
    Chonghe, Taipei County, Taiwan, R.O.C.
    Posts
    231

    Re: Vectors transfer...Please help, Thank you

    how about this way :
    create a class , say, RowData which consist of three members. It might look like this :
    public RowData {
    public String col_1;
    public String col_2;
    public String col_3;
    }
    get your data from Vectors and put the value to the corresponding field. After
    the task fo transferring values, you may put the instance of RowData into the
    Vector by Vector.addElement() method.
    good luck


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