Objective-c Lyrics Analysis

Source: Internet
Author: User

#import<Foundation/Foundation.h>intMainintargcConst Char*argv[]) {FILE* FP1;//define file pointers for reading files    Char* FP2;//to determine if the lyrics are finished .    Chars[ the];//Staging Lyrics    Long intTime2=0; Long intTime=0;//used to calculate the time, the accuracy of seconds, not perfect, looking at the expert pointing    intA=1;//play a role in judgingFp1=fopen ("/users/qingyun/desktop/Chase Dream Eisenia foetida Heart. LRC","R");//read-only open, path can be defined by macroFgets (s), +, FP1); //in order to output the song name     while(a) {a++; if(s[a]==']')        {             Break; }} S[a]=' /'; printf ("Song name:%s\n", &s[3]); Sleep (3); Fgets (s), +, FP1); //in order to output the singer nameA=1;  while(a) {a++; if(s[a]==']')        {             Break; }} S[a]=' /'; printf ("Singer:%s\n", &s[3]); Sleep (3); Fgets (s), +, FP1); //because some lyrics have other properties, for compatibility only output song name and singer name, followed by lyrics     while(s[1]!='0') {fgets (s), +, FP1); }     while(Fp2!=null)//Judging if the lyrics are finished reading{ Time= (s[1]-'0')*60000+ (s[2]-'0')*6000+ (s[4]-'0')* ++ (s[5]-'0')* -+ (s[7]-'0')*Ten+ (s[8]-'0')*1; printf ("%s", &s[Ten]);  while(time>time2) {Sleep (1); Time2+= -; } FP2=fgets (s), +, FP1); } fclose (FP1);//Close File    return 0;}

Objective-c Lyrics Analysis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.