hello everyone umm I'm having trouble in printing a structure in c... is a program to calculate benefits of employees in a company when they are fired.. getting trouble when printing the hired date of an employee here its the code
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
void menu();
struct employee{
char company[70];
char name[50];
char hired_date[10];
char fired_date[10];
double salary[5];
}empl;
int main()
{
menu();
gotoxy(31,4); gets(empl.company);
gotoxy(31,5); gets(empl.name);
gotoxy(31,6); scanf("%s", empl.hired_date);
gotoxy(66,6); scanf("%s", empl.fired_date);
gotoxy(20,19);printf("%s", empl.company);
gotoxy(20,20);printf("%s", empl.name);
gotoxy(20,21);printf("%s", empl.hired_date); //PROBLEM HERE!!
gotoxy(20,22);printf("%s", empl.fired_date);
getch();
gotoxy(45,24);system("pause");
return 0;
void menu()
{
cuadrado(75,6,2,2);
gotoxy(5,4); printf("Company Name.......:");
gotoxy(5,5); printf("Employee Name...........:");
gotoxy(5,6); printf("Hired Date..............:"); gotoxy(42,6); printf("Fired Date..........:");
}
.. HELP!! why when I printf the hired date it print both? hired and fired date?? like this
01/01/2011/01/01/2012