Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //в четырехугольном классе
- istream& operator>>(istream &in, quadrangle &q)
- {
- point a;
- for (int i = 0; i < 4; i++)
- {
- in >> a.x >> a.y;
- q.table[i].x = a.x;
- q.table[i].y = a.y;
- }
- if (!in)
- throw "Error of reading!";
- return cin;
- }
- //майн
- void scanF(FILE *f, node *first)
- {
- ifstream in(f);
- node *tmp=first, *newtmp;
- while (!feof(f))
- {
- fflush(stdin);
- newtmp = new node;
- try
- {
- in >> newtmp->info;
- }
- catch (char *error)
- {
- cerr << error << endl;
- }
- if (in)
- {
- tmp->next = newtmp;
- newtmp->prev = tmp;
- newtmp->next = 0;
- tmp = tmp->next;
- }
- in.clear();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement