fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct data { time_t dt; string group,name,subject; };
  5. struct node { data *rec; node *next; };
  6. struct list { node *head; };
  7.  
  8. data *makeData(time_t dt,string group,string name,string subject) // zamiast tego musi być konstruktor, bo to co robisz to nie C++ tylko C z cin/cout i new/delete
  9. {
  10. data *tmp=new data;
  11. tmp->dt=dt;
  12. tmp->group=group;
  13. tmp->name=name;
  14. tmp->subject=subject;
  15. return tmp;
  16. }
  17.  
  18. node *makeNode(data *rec,node *next) // zamiast tego musi być konstruktor, bo to co robisz to nie C++ tylko C z cin/cout i new/delete
  19. {
  20. node *tmp;
  21. tmp->rec=rec;
  22. tmp->next=next;
  23. return tmp;
  24. }
  25.  
  26. void append(list *lst,data *rec) // zamiast tego musi być metoda, bo to co robisz to nie C++ tylko C z cin/cout i new/delete
  27. {
  28. lst->head=makeNode(rec,lst->head);
  29. }
  30.  
  31. int main()
  32. {
  33. // your code goes here
  34. return 0;
  35. }
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
Standard output is empty