Herranz

Sesión 12: Ficheros de texto y ficheros binarios

Playlists

Playlist como fichero de texto

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
"Dakiti", "Bad Bunny & Jhay Cortez", 194, 5
"Quédate", "Quevedo", 220, 4
"Baby Hello", "Rauw Alejandro & Bizarrap", 205, 5
"LALA", "Myke Towers", 180, 4
"Columbia", "Eladio Carrión", 210, 3
"Tulum", "Peso Pluma", 230, 5
"La Bachata", "Manuel Turizo", 200, 4
"Palabras Sobran", "Feid", 215, 5
"Automático", "María Becerra", 225, 4
"Delincuente", "Tokischa & Anuel AA", 190, 3

Playlist como fichero de binario

1
2
3
4
5
6
7
8
9
The mode string can also include the letter  'b'  either  as  a
last  character or as a character between the characters in any
of the two-character strings described above.  This is strictly
for compatibility with ISO C and has no effect; the 'b' is  ig‐
nored on all POSIX conforming systems, including Linux.  (Other
systems  may treat text files and binary files differently, and
adding the 'b' may be a good idea if you do  I/O  to  a  binary
file and expect that your program may be ported to non-UNIX en‐
vironments.)

Leyendo un fichero binario