mardi 25 février 2020

I have a problem about linked list and its nodes

I have a homework in c++ (using vector is illegal. the only vector in struct). I have to create a linked list and every node has 3 different empty data. First is int for month, second is int for year and the last one is vector of string for specific number from struct. But I'm trying to learn and not good at it. How can i create the linked list? And while creating every node i have to add year and month in it. And I have to pushback the number in vector. But if the month and year will be the same in another line i have to pushback the number to old vector which has the same month and year in same node. my txt file is like that

number month year number month year ... ... ...

it goes like that. every number is specific. but year and month could be same.

Aucun commentaire:

Enregistrer un commentaire