Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. struct artist *update_counts(struct artist *a, struct play *p){
  2. struct artist* return_artist = a;
  3. int tmp_playcount = 0;
  4. while (a!= NULL)
  5. {
  6. tmp_playcount = 0;
  7. while(p!=NULL)
  8. {
  9. if(a->artist_id == p->artist_id)
  10. {
  11. printf("SAUSAGE");
  12. tmp_playcount = tmp_playcount + p->playcount;
  13. a->playcount = tmp_playcount;
  14. }
  15. p = p->next;
  16.  
  17. }
  18.  
  19. a = a->next;
  20. }
  21. return return_artist;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement