Question: I did a program in C but I need to use C++. Please try to fix this program so it could run as a .cpp

I did a program in C but I need to use C++. Please try to fix this program so it could run as a .cpp file (C++). I am using the eclipse IDE. Please try to run and build it to see if it works. There is a text file included called list.txt. Just make your own. The content of it can just be one line like 1:Bob Marley - One Love.mp3

I did a program in C but I need to use C++.

#include 4 5 6 #define LINE LENGTH 100 #define MAX ARTIST 5 //Main int main(int argc, char* argv[]) FILE" file fopen("list.txt", if(file ?# NULL) "r"); //open file 1e printf("Error: Check to see if the file is correctly named and included") return 1; int count-e; char *artistTemp; char *songTemp; char line [LINE LENGTH] char *artist[MAX_ARTIST] char *songs [MAX_ARTIST] while (fgets(line, sizeof(line), file)&& count

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!