1 / 19

apples peaches pears

bananas apples peaches pears OLDVERSION.TXT apples peaches pears plums raspberries strawberries tangerines NEWVERSION.TXT apples bananas peaches pears plums strawberries tangerines How to modify a file. You can't! Method 1: Copy and modify. Method 2:

Télécharger la présentation

apples peaches pears

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. bananas apples peaches pears

  2. OLDVERSION.TXT apples peaches pears plums raspberries strawberries tangerines NEWVERSION.TXT apples bananas peaches pears plums strawberries tangerines How to modify a file. You can't! Method 1: Copy and modify.

  3. Method 2: Copy input file to an array. theFile.TXT char data[100][80] apples peaches pears plums raspberries strawberries tangerines [0] apples [1] peaches [2] pears [3] plums [4] raspberries [5] strawberries [6] tangerines

  4. Close the input file. char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] [0] apples [1] peaches [2] pears [3] plums [4] rasberries [5] strawberries [6] tangerines apples peaches pears plums raspberries strawberries tangerines

  5. Modify the array. char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches pears plums raspberries strawberries tangerines

  6. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches pears plums raspberries strawberries tangerines

  7. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches pears plums raspberries strawberries tangerines tangerines

  8. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches pears plums raspberries strawberries strawberries tangerines

  9. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches pears plums rasberries raspberries strawberries tangerines

  10. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches pears plums plums raspberries strawberries tangerines

  11. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches pears pears plums raspberries strawberries tangerines

  12. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples peaches peaches pears plums raspberries strawberries tangerines

  13. Modify the array. Add bananas char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples bananas peaches pears plums raspberries strawberries tangerines

  14. Modify the array. Remove raspberries char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples bananas peaches pears plums raspberries strawberries tangerines

  15. Modify the array. Remove raspberries char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples bananas peaches pears plums strawberries strawberries tangerines

  16. Modify the array. Remove raspberries char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples bananas peaches pears plums strawberries tangerines tangerines

  17. Modify the array. char data[100][80] data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples bananas peaches pears plums strawberries tangerines tangerines

  18. Open the file for output. char data[100][80] theFile.TXT data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples bananas peaches pears plums strawberries tangerines tangerines

  19. Copy array to file. char data[100][80] theFile.TXT data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] data[8] apples bananas peaches pears plums strawberries tangerines tangerines apples bananas peaches pears plums strawberries tangerines

More Related