Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct artist *update_counts(struct artist *a, struct play *p){
- struct artist* return_artist = a;
- int tmp_playcount = 0;
- while (a!= NULL)
- {
- tmp_playcount = 0;
- while(p!=NULL)
- {
- if(a->artist_id == p->artist_id)
- {
- printf("SAUSAGE");
- tmp_playcount = tmp_playcount + p->playcount;
- a->playcount = tmp_playcount;
- }
- p = p->next;
- }
- a = a->next;
- }
- return return_artist;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement