Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   How to rewrite Memo1 to arrays? (http://www.go4expert.com/forums/rewrite-memo1-arrays-t26075/)

Owad88 16Jun2011 18:00

How to rewrite Memo1 to arrays?
 
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[i] = StrToInt(Memo1->Lines-> ??? );
Tab2[i] = StrToDouble(Memo1->Lines-> ??? );
}


Please correct it
Thank You

xpi0t0s 17Jun2011 13:54

Re: How to rewrite Memo1 to arrays?
 
What are the type definitions of Memo1 Lines?


All times are GMT +5.5. The time now is 17:36.