Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. struct obraz_parametry **tab_s; //deklaracja
  2.  
  3. tab_s = (struct obraz_parametry **)malloc(sizeof(struct obraz_parametry) * 1); // DAJE JEJ JAKIS ROZMIAR NA POCZATEK (1)
  4. for(i=0;i<1;i++)
  5. {
  6. tab_s[i]=(struct obraz_parametry*)malloc(sizeof(struct obraz_parametry));
  7. }
  8.  
  9. void str_real(struct obraz_parametry **tab_s, int *old_size) // a to funkcja do powiekszania tablicy struktur o 1
  10. {
  11. int new_size;
  12. new_size=*(old_size)+1;
  13. (*tab_s) =(struct obraz_parametry *)realloc(*tab_s, new_size*sizeof(*tab_s));
  14. *(old_size)=new_size;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement