Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. void ReplaceTabs(FILE *file)
  2. {
  3. int currChar = 0;
  4.  
  5. if (file != NULL)
  6. {
  7. while((currChar = fgetc(file)) != EOF)
  8. {
  9. if(int currChar = 0 == '\')
  10. {
  11. currChar = fgetc(file);
  12.  
  13. if(currChar == 't') //
  14. {
  15. // Here's where i stuck ...
  16. printf("t");
  17. }
  18. else
  19. {
  20. putchar(92); // ==
  21. putchar(currChar);
  22. }
  23. }
  24. else
  25. {
  26. putchar(currChar); // To print the chars
  27. }
  28. }
  29. }
  30. else
  31. printf("The file does not exists!");
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement