C++ File Input and Output

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 38

  • @faresawachi3305
    @faresawachi3305 Před rokem +1

    That was a Great explanation man, thanks. You saved me a lot of time and effort.

  • @azeez8399
    @azeez8399 Před rokem

    Tried this code on Replit for Android and it works. Thanks!

  • @mihai3043
    @mihai3043 Před 2 lety +6

    Thanks man, you helped me a lot.

  • @Itisnot2late
    @Itisnot2late Před rokem +5

    Thanks! It helped me a lot.

  • @DavisTibbz
    @DavisTibbz Před 11 měsíci +2

    Nice. But i dont think you should exit with a return 0. You could return with -1 or EXIT_FAILURE

  • @chidanandskusur4054
    @chidanandskusur4054 Před rokem +3

    Great explanation sir. 💐🌷🌹🥀🌻🌼

  • @shushe3953
    @shushe3953 Před rokem

    well explained way better then my professor fr

  • @priscusemmanuel8403
    @priscusemmanuel8403 Před 2 lety +2

    I need help sir, I am using a MacBook Pro and I can't open these files or create one for that matter, I would appreciate your help

  • @Primer9
    @Primer9 Před rokem +1

    Great video

  • @MementoMoriMementoVivere881

    Great explanation ! thank you

  • @timog7358
    @timog7358 Před 5 měsíci

    great video

  • @Ali_X20
    @Ali_X20 Před 2 lety +1

    bro u r amazing

  • @lemniscate23
    @lemniscate23 Před rokem

    Very helpful

  • @Little_G_Dizzle
    @Little_G_Dizzle Před rokem

    I have one question: after making the file, where does it get stored? I am using an arduino R3 and a SD card as my source of storage, how do I move the file to an external drive?

    • @shmeowlex
      @shmeowlex  Před rokem

      I am not familiar with the arduino platform unfortunately :(

  • @elaine3867
    @elaine3867 Před rokem

    Is there a need to check if the output file exists? Because from what I know, the output file will be created automatically in the project folder if it does not exist

    • @shmeowlex
      @shmeowlex  Před rokem +1

      If the path to the file is invalid it will fail (i.e. if you wanted to place your output in an output directory but the output directory was not created yet).

    • @elaine3867
      @elaine3867 Před rokem

      @@shmeowlex Understood, thanks!

  • @1..1..1..1H
    @1..1..1..1H Před rokem

    Why does the info get deleted when I run the program again even though I wrote endl at the end? and how do I prevent that from happening?

    • @shmeowlex
      @shmeowlex  Před rokem

      output files get deleted and recreated every time you open them.

  • @chefskiss651
    @chefskiss651 Před rokem

    I have a question. What if your input and output files are the same? I mean like the results of your input has to be added to the same file?

    • @shmeowlex
      @shmeowlex  Před rokem

      you would need to read everything in from the file into arrays, then output everything with the appended data.

  • @Evizzo
    @Evizzo Před 2 lety

    is there a function build in or something so i aim at certain string/line of txt file with fstream ?

    • @shmeowlex
      @shmeowlex  Před rokem

      No, you would need to read through the file

  • @mr.shredder5430
    @mr.shredder5430 Před 6 měsíci

    why are you using return 0 on if statement, i cannot get the logic?

    • @shmeowlex
      @shmeowlex  Před 4 měsíci

      To terminate the program.