Advertisement
Guest User

Untitled

a guest
Sep 4th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #ifndef TASK_H
  2. #define TASK_H
  3.  
  4. #include <stdio.h>
  5. #include "task_status.h"
  6.  
  7. int task_static_id_counter = 1;
  8.  
  9. typedef struct {
  10.     char *text;
  11.     int id;
  12.     Task_Status status;
  13. } Task;
  14.  
  15. Task task_create(char *text, Task_Status status) {
  16.     Task new_task;
  17.  
  18.     new_task.text = text;
  19.     new_task.status = status;
  20.     new_task.id = task_static_id_counter++;
  21.  
  22.     return new_task;
  23. }
  24.  
  25. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement