Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- znak[0] = 0;
- char c = 0;
- while (znak[poc_matic] != '\n')
- {
- if((A = realloc(A, (poc_matic +1) * sizeof(matice))) == NULL)
- {
- uvolni_pamat(A, poc_matic);
- free (znak);
- return 100;
- }
- if((znak = realloc(znak, (poc_matic + 2) * sizeof(char))) == NULL)
- {
- uvolni_pamat(A, poc_matic);
- free (znak);
- return 100;
- }
- znak[poc_matic] = nacitaj_maticu(&A[poc_matic]);
- if (znak[poc_matic] == 100)
- {
- printf("chyba");
- uvolni_pamat(A, poc_matic+1);
- free(znak);
- return 100;
- }
- else if (znak[poc_matic] == 101)
- {
- printf("chyba");
- uvolni_pamat(A, poc_matic);
- free(znak);
- return 100;
- }
- znak[poc_matic] = getchar();
- znak[poc_matic + 1] = getchar();
- printf("ttt %c\n", znak[poc_matic]);
- poc_matic++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement