|
在TimeSeries.h中这样声明:
ostream& operator<<(ostream& s)
TimeSeries.c中这样定义:
ostream& TimeSeries:perator<<(ostream& s)
{for ( TIME t=0; t<=length; ++t )
s << t << '\t' << series[t] << '\n';
}
然后在linux下编译报错
syntax error before `&' token
我对c++中的i/o流不太熟悉,请高手指点一下,thanks. |
|