Hi everyone,
I get a funny message whe I compile the program below.
ld:
Object file format error in: time.h: read_cur_obj_info: bad file magic number(0x7473)
Here is the code, Please point me to any errors that I am making.
Thanks
#include<stdio.h>
#include"time.h"
struct TIME {
int hours;
int minutes;
int seconds;
};
typedef struct TIME Time;
Time get_time();
void printt(Time);
int pftime();
void main(void)
{
Time t;
t = get_time();
printt(t);
printf("the totoal number of seconds is %i\n", pftime(t));
}
#include "time.h"
int pftime(Time parm)
{
int t_n_s;
t_n_s = ((3600 * parm.hours) + (60 * parm.minutes) + parm.seconds);
return t_n_s;
}
#include"time.h"
#include<stdio.h>
Time get_time()
{
Time parm;
printf("Please enter hours: "
scanf("%i", &parm.hours);
printf("Please enter minutes: "
scanf("%i", &parm.minutes);
printf("Please enter seconds: "
scanf("%i", &parm.seconds);
}
#include"time.h"
#include<stdio.h>
void printt(Time t)
{
printf("%i : %02i : %02i", t.hours, t.minutes, t.seconds);
}
I get a funny message whe I compile the program below.
ld:
Object file format error in: time.h: read_cur_obj_info: bad file magic number(0x7473)
Here is the code, Please point me to any errors that I am making.
Thanks
#include<stdio.h>
#include"time.h"
struct TIME {
int hours;
int minutes;
int seconds;
};
typedef struct TIME Time;
Time get_time();
void printt(Time);
int pftime();
void main(void)
{
Time t;
t = get_time();
printt(t);
printf("the totoal number of seconds is %i\n", pftime(t));
}
#include "time.h"
int pftime(Time parm)
{
int t_n_s;
t_n_s = ((3600 * parm.hours) + (60 * parm.minutes) + parm.seconds);
return t_n_s;
}
#include"time.h"
#include<stdio.h>
Time get_time()
{
Time parm;
printf("Please enter hours: "
scanf("%i", &parm.hours);
printf("Please enter minutes: "
scanf("%i", &parm.minutes);
printf("Please enter seconds: "
scanf("%i", &parm.seconds);
}
#include"time.h"
#include<stdio.h>
void printt(Time t)
{
printf("%i : %02i : %02i", t.hours, t.minutes, t.seconds);
}