1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    What are the type definitions of Memo1 Lines?
     

Share This Page