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

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

Комментарии • 8

  • @ashishranjan3051
    @ashishranjan3051 3 месяца назад

    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  3 месяца назад

      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.

  • @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++.

  • @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 11 месяцев назад

    i guess u accidentally said putg and putp :)