代码如下:请问大家我的错误在哪里?
public struct Crossing
{
public Crossing(int i)
{
flow_in = new float[4];
returning_ratio = new float[4, 3];
tongxing = new float[4, 3];
}
public float[] flow_in;
public float[,] returning_ratio;
public float[,] tongxing;
}
class Program
{
static void Main(string[] args)
{
Crossing[] crossings = new Crossing[20];
StreamReader sr = new StreamReader("F:\\c# exercise\\baoheduCeshiDemo\\baoheceshi.txt");
string line;
for (int i = 0; i < 20 ; i++)
for (int j = 0; j < 4 && ((line = sr.ReadLine()) != null); j++)
crossings.flow_in[j] = float.Parse(line);
}
}