主题:求助C++ 很迷茫 不太明白解这道题的思路
ID3 is a metadata container most often used in conjunction with the MP3 audio file format. It allows information such as the title, artist, album, or other information about the file to be stored in the file itself.
After the creation of the MP3 standard, there appeared a problem with storing data about the file. Standalone MP3s didn't have any special method of doing this, so in 1996 Eric Kemp came up with the idea to add a small chunk of data to the audio file, thus solving the problem. The standard was called ID3v1 and it quickly became the standard for storing metadata in MP3s. The ID3v1 tag occupies 128 bytes, beginning with the string TAG. The tag was placed at the end of a MP3 file.
The tag allowed for 30 bytes for the title, artist, album, 4 bytes for the year, 30 bytes "comment", and a byte to identify the genre of the song. If there is an item which is less than its length, 0 is used to fill in the empty positions.
Please write a C++ language program to read these information from a mp3 file and print them out.
1) Use command line to input a MP3 file name;
2) Judge whether the file name's extension is ".mp3";
3) If it's a MP3 file, judge whether it has ID3v1 information;
4) If it has ID3v1 information, print out all of them;
Sample Input
You can download the sample MP3 file from here .
Sample Output
Title: 后来
Artist: 刘若英
Album: 我等你
Year: 2001
Comments: 好听的歌
Genre: Pop
讲解下思路 最好有源代码 然后讲解下 谢谢了 我刚刚开始学C++有很多不懂