ok so I have a few problems with my code, first off the program i am trying to make uses a database, the user inputs a date and my program will turn it into a code that it will store in a txt file and the program will read it every night at mid night and if it has a code correspondes with the date it will show on the screen how many there are. but my problem right now is that i cant change the date to code.
this is what i was trying to do but it crashes. this test does not include the whole date i was only testing with february, (at one point i think i try to change a char variable into an int variable, i dont no if this is legal or not so feel free to comment about it.) i have included an attachment if you wish to run it in your compiler.
int main(int arge, char *argv)
char answer = 'y';
pfile = fopen("database2.txt", "w");
if (pfile != NULL)
while (answer == 'y')
printf("write the month: ");
if (month == february);
february = 01;
printf("what is happening:");
fprintf(pfile,"%s", &sced); /* crashes here*/
printf("do you wish to put in any more dates [y/n] \n");
answer = getch();
printf("could not open the file.\n");