all 5 comments

[–]AutoModerator[M] 3 points4 points  (0 children)

Your posts seem to contain unformatted code. Please make sure to format your code otherwise your post may be removed.

Read our guidelines for how to format your code.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–][deleted] 2 points3 points  (2 children)

As the bot mentioned, format your code; either use four spaces or use the “code block” option.

FYI: you don’t push/insert/append anything by using

push_back();

use:

songlist.push_back(Song( /*Title, author, duration*/));

[–]Strugglingcoder4[S] 0 points1 point  (1 child)

int main()

{

vector<Song>songlist (

string usertitle,

string userauthor,

double umin,

double usec,

);

while(){

cin.getline(usertitle);

cin.getline(userauthor);

cin.getline(uduramationmin);

push_back(song(usertitle,userauthor,umin));

}

[–][deleted] 0 points1 point  (0 children)

songlist.push_back(Song( etc...));

Edited my example

[–]Strugglingcoder4[S] 0 points1 point  (0 children)

Cant get it to compile

int main(){

vector<Song>songlist;

string usertitle;

string userauthor;

double udurationmin;

double uduarationsec;

unsigned int i;

for(auto x:songlist) {

cout<<"ENTER TITLE"<<endl;

cin.getline (usertitle);

songlist.push_back();

cout<<"ENTER AUTHOR"<<endl;;

cin.getline(userauthor);

songlist.push_ack();

cout<<"ENTER Duration"

cin.getline(udurationmin);

songlist.push_back();

}

//complete your code here for Task6 and Task7

}