Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void addPoint(Point *Tab, int x, int y, bool exist, int k) {
- int h = hash_f(k);
- if (Tab[h].exist == 0) {
- Tab[h].x = x;
- Tab[h].y = y;
- Tab[h].exist = exist;
- }
- else {
- cout << "Обнаружена коллизия!\n";
- while (Tab[h].exist == 0) {
- h++;
- if (Tab[h].exist == 1)
- continue;
- if (h < 100 & Tab[h].exist == 0) {
- Tab[h].x = x;
- Tab[h].y = y;
- Tab[h].exist = exist;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement