Advertisement
Guest User

main_date

a guest
Apr 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include "date.h"
  4.  
  5. int main(void){
  6.     Date *p_date;
  7.     Date **pp_date = &p_date;
  8.    
  9.     int day=0;
  10.     int month=0;
  11.     int year=0;
  12.    
  13.     scanf("%d%d%d", &day, &month, &year);
  14.  
  15.     if(new_date(day,month,year, pp_next_date) == -1){
  16.     (void)printf("ERROR\n");
  17.     return 255;
  18.     }
  19.     printf("%p %p\n", *pp_date, pp_date);
  20.     free(*pp_date);
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement