амі.
Додаток
# include
# include
# include "resource.h"
# include
# include file_name [MAX_PATH +1], customfilter [100]; ** matr, k, flag; of, sf; CepCont
{ce, kk;
CepCont * adres;
}; * BegSpis = NULL; * vvod_file (char file_name [])
{ce, kk; * f_in; _in = fopen (file_name, "r"); (f_in! = NULL)
{* st = NULL;
CepCont * sp = NULL;
while (fscanf (f_in, "% d% d", & ce, & kk) == 2)
{= new CepCont; (BegSpis == NULL) BegSpis = st; sp-> adres = st; = st;
st-> ce = ce;> kk = kk;
}
if (sp! = NULL) sp-> adres = NULL; (f_in);
return BegSpis;
}
{
return NULL;
}
} vivod_spis (CepCont * st, HWND hwndEdit)
{n, i; buf [25]; (st! = NULL)
{(buf, "Ланцюг% d tКонтактов% d", st-> ce, i
{(buf, "Елемент% d Контакт% d", st-> ce, st-> kk); (hwndEdit, EM_REPLACESEL, 0, (LPARAM) buf); (hwndEdit , EM_REPLACESEL, 0, (LPARAM) " r n"); = st-> adres;
} (hwndEdit, EM_REPLACESEL, 0, (LPARAM) " r n");
}
} kol_elem (CepCont * st)
{max = 0, i, n; (st! = NULL)
{= st-> kk; = st-> adres; (i = 0; i
{(st-> ce> max) max = st-> ce; = st-> adres;
}
} max;
} del_matr (int ** matr, int k)
{(int i = 0; i
} ** memory (int k)
{** matr = new int * [k]; (matr == NULL) return NULL; (int i = 0; i
{[i] = new int [k]; (matr [i] == NULL)
{_matr (matr, i); NULL;
}
} matr;
} ** form_matr (CepCont * st, int k)
{i, j, n; ** matr = memory (k); * sp; (matr == NULL) return NULL; (i = 0; i
{= st-> kk; = st-> adres; (n! = 0)
{(i = 0; i
{= st; = st-> adres; (sp-> ce! = st-> ce)
{[sp-> ce-1] [st-> ce-1] + +; [st-> ce-1] [sp-> ce-1] + + ;
}
} = st-> adres;
}
} m...