Originally Posted by
rogster001
if you know c++ use a class or a structure eg 'marketdata' with attributes, data, name, and close
then declare an array of objects of this class
marketdata records[10];
then you can put it in a loop and read the info into the structure like records[i].close =....
Code:
The initial file is marketdate.txt, 1st column is date, 2nd Name, 3-6 columnsare prices. My purpose is to read date, name and 6th's price into array date[365], name[ ] and close[365].
I guess the meaning of your answer may like:
class marketdata
{
public:
string date;
string name;
float close;
};
int main( )
{
marketdata data_array[ 7][365];
…(to read marketdate.txt, how?)…..
………………………………
}
Now the question is how to read the related data in the marketdat.txt
into the array?