How to rewrite Memo1 to arrays?

Discussion in 'C' started by Owad88, Jun 16, 2011.

  1. Owad88

    Owad88 New Member

    Joined:
    Jun 16, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    How to rewrite the value of Memo1 to 2 arrays?
    For example, when in Memo1 I have:
    4 3.2
    1 9.4
    2 3.0
    6 3.3

    Memo1 sends the values to two arrays, such that:
    Tab1[0] = 4
    Tab1[1] = 1
    Tab1[2] = 2
    Tab1[3] = 6

    Tab2[0] = 3.2
    Tab2[1] = 9.4
    Tab2[2] = 3.0
    Tab2[3] = 3.3

    How to do this?

    I tried to do this as follows:
    int SizeTab = Memo1->Lines->Count;

    int* Tab1;
    double* Tab2;

    for(int i = 0; i < SizeTab; i++)
    {
    Tab1 = StrToInt(Memo1->Lines-> ??? );
    Tab2 = StrToDouble(Memo1->Lines-> ??? );
    }


    Please correct it
    Thank You
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    What are the type definitions of Memo1 Lines?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice