C++ Tutorial: File Random Access // How to fast forward and rewind through your files!

Поділитися
Вставка
  • Опубліковано 31 жов 2024

КОМЕНТАРІ • 8

  • @wuxianggujun979
    @wuxianggujun979 Рік тому

    Thank you very much for the tutorial! I don't understand if serialization in Java is the same as outputting structs as binary in C++.

  • @ashishranjan3051
    @ashishranjan3051 16 днів тому

    i did not get the Binary part like how u are using reinterpret and how u are using, i have not studied it so can u name the topic so i can go through it

    • @ProfessorHankStalica
      @ProfessorHankStalica  15 днів тому

      The short answer is that reinterpret_cast is like static_cast, but for pointers. The read and write methods require a pointer of type char, but if you are writing a double memory location, then you can't just pass a double pointer. You need to cast it. reinterpret_cast tells the compiler to treat it's argument as the given type.

  • @monikasehgal9920
    @monikasehgal9920 Рік тому

    Q.) What to do if my vscode on doing tellg and seekg returns -1 all the time and gives error and works sometime when i dont use too many modes but thats also fails sometimes.

  • @faizaniftikhar
    @faizaniftikhar 8 місяців тому

    i guess u accidentally said putg and putp :)