1int main()
2{
3 std::cout << "Please enter the file name: ";
4 std::string name;
5 std::getline (std::cin, name);
6 ifstream ifs(name.c_str());
7 if (!ifs) error("can't open input file ", name);
8
9 vector < Point > points;
10 Point p;
11 while (ifs >> p) points.push_back(p);
12 // ....
13}