这段代码为什么编译不过??
#include <iostream>using namespace std;template<class type, int dim>class point{public: point() {}; point(type coords[dim]) { for (int index = 0; index < dim; index ++) { _coords[index] = coords[index]; } } type& operator[](int index) { //assert(index < dim && index >= 0); return _coords[index]; } type operator[](int index) const { return _coords[index]; } //ostream& operator<<(ostream &os, const point<type, dim> &pt); void print() { cout << "point::print()\n" << endl; }private: type _coords[dim];};inline template<class type, int dim>ostream& operator<<(ostream &os, const point<type, dim> &pt){ os << "("; for (int ix = 0; ix < dim-1; ix ++) { os << pt[ix] << ","; } os << pt[dim-1]; os << ")";}void main(){ cout << "I'm in main" << endl;}