how to store values in a structure array
<p>I'm having a problem storing certain processed values in my program into a structure array.
These values contain 3 long integers, and I'm trying to store these values as arrays in my structure.</p>

<p>This is a simplified, relevant version of my whole code. Please help me make it work.  </p>

<pre><code>#include&lt;iostream&gt;
#define MAX 20

using namespace std;

struct DATA
{
    int id, number;
    float height;
} stuarray [MAX];

int main ()
{
 long int1 =0;      //contains integer values obtained from a file                                       
 long int2 =0;      //contains integer values obtained from a file
 long int3 =0 ;     //contains integer values obtained from a file

 cout&lt;&lt; stuarray[MAX].id &lt;&lt; endl;
 cout&lt;&lt; stuarray[MAX].number &lt;&lt; endl;
 cout&lt;&lt; stuarray[MAX].height &lt;&lt; endl;
 return 0;
}
</code></pre>

<p>okay, i'll explain my program. im reading values from a file as a string. after this im supposed to split them into 3 parts and store them in an array. this arrays should refer to the member variables in the structure. 
i have managed to read the values, split them, and convert all 3 of them into long ints.
now i have to store these three values in the structure array.
thank you all for ur help.</p>
