Question: My question is how do I parse through my CSV file and extract only the song title which is within the third set of quotes,

 My question is how do I parse through my CSV fileand extract only the song title which is within the third setof quotes, for example in the top part, " t " is

the song title and I would like to place that string value

My question is how do I parse through my CSV file and extract only the song title which is within the third set of quotes, for example in the top part, " t " is the song title and I would like to place that string value into str2 so that it compares the song title they are looking for with the song title in the list and then a check statement that then prints more than one song title if there are more with that same title, then I need to have the function of being able to edit the contents of that line like artist name, song title, album name, basically every entry there is.

So to sum up, I need an edit function that searches the csv file for the matching song title and then when the song title is found, it allows the user to change any information within the node and then update it to the csv file. IN C PROGRAMMING LANGUAGE

Node* Editplaylist(Node* plist) FILE* infile = fopen("musicPlayList.csv", "r"); char line[100] = ""; char str1[20]; printf("Enter song title: "); scanf("%s", stri); strcmp(tolower(str1), tolower(str2)); fclose(infile); 19 Qint main Node* playlist = NULL; int choice = 0; while (choice != 3) printf(" 1. Load"); // Takes info from csv and parses file into structs & doubly linked list printf(" 2. Store"); // writes the csv file to the csv file in opposite order printf(" 3. Display"); // prints the listodes to display screen printf(" 4. Insert"); // inserts items in list printf(" 6. edit"); // edits information in the list printf(" 8. rate"); // rates the song printf(" 9. play"); // prints the selected song, prints each song in order from current song printf(" 11. exit"); 11 Exit feature, ends program printf(" Enter Menu option: "); scanf("%d", &choice); switch (choice) case 1: playlist = Loadplaylist(); DisplayList(playlist); break; case 2: storeplaylist(playlist); system("cls"); break; case 3: DisplayList(playlist); break; // insert an item into the list case 4: playlist = InsertNew (playlist); DisplayList(playlist); storeplaylist(playlist); break; // // edit a specific item in the list case 6: playlist = Editplaylist(playlist); break; 1/ // edit rating in the list //case 8: // break; 1/ // play item in the list //case 9: 866868822 // break; case 11: exit(); break; } #ifndef DOUBLY_LINKED #define DOUBLY_LINKED #define _CRT_SECURE_NO_WARNINGS #include #include #include #include typedef struct duration { int Minutes; int Seconds; | } Duration; typedef struct data { // describing info being taken in char Artist[20]; char Album_title[50]; char Song_title[50]; char Genre[10]; Duration length; int playback; int Rating; | } Data; 2 3 4 5 6 7 8 9 9 19 11 12 12 13 - 14 57 15 16 10 17 - 18 10 19 - 20 20 21 2- 22 24 23 24 25 26 27 2 28 20 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 typedef struct node { Data Record; struct node* pNext; // Adress for next node struct node* pPrev; // second link } Node; typedef struct list { Node* pHead; }List; void initlist(List* plist); // set to empty list Node* makeNode (Data* pNewdata); // allocate space; init space Node* insertFront(Node* plist, Data* pNewData); Node* Loadplaylist(); void storeplaylist(); void DisplayList(Node* plist); Node* InsertNew(Node* plist); Node* Editplaylist(Node* plist); Fendi Header.h* 1 2 3 4 5 6 7 8 9 10 11 functions.c* main.c* musicPlayList.csv + X m,g,t, rap, 3:30,3,4 "Brooks, Garth", FRESH HORSES, The Old Stuff, Country, 2:57,11,2 "Swift, Taylor", RED, Stay Stay Stay, Pop,4:42,5,1 Adele, 25, Remedy, Pop, 4:11, 24,4 Eminem, SHADYXV, Vegas, Rap,3:37,8,3 "Bieber, Justin", PURPOSE, No Sense, Pop, 4:12,6,1 "Perri, Christina", HEAD OF HEART,Trust, Pop, 2:35,3,5 Drake, YOU WELCOME , The Motto, Rap,4:13,7,4 Drake, NOTHING WAS THE SAME, Own it, Rap, 3:23,3,3 "Swift, Taylor", 1989, Shake it off, Pop, 3:35,12,3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!