Guest User

Untitled

a guest
Dec 6th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <ctype.h>
  5. #include <assert.h>
  6.  
  7. char * RLEDecompress ( const char * src )
  8. { int i=0;
  9. while(src[i]!='/0') // Вот тут уже СЕГ ФАУЛТ. Либо я даже делал что просто вначале функции задавал src=malloc(10000)
  10. i++; //но это все равно не помогло
  11. }
  12.  
  13. int main ( int argc, char * argv [] )
  14. {
  15. char * res;
  16. assert ( ! strcmp (
  17. (res = RLEDecompress ( "Hello world!" )),
  18. "Hello world!" ));
  19. free ( res );
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment