brozikcz

Untitled

Nov 25th, 2011
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.14 KB | None | 0 0
  1. int max=strlen(str)*2;
  2.  
  3. char * s=(char *)calloc(1,max);
  4.  
  5. if(max<(int)strlen(s)+20){
  6.     max+=max*5;
  7.     s=(char *)realloc(s,max*sizeof(s));
  8. }
  9.  
Advertisement
Add Comment
Please, Sign In to add comment