I have a program which takes in the user input for classroom and time. The classroom input is store inside a char* classroom, and the time is store inside a int time. However, when I run the program, it stops at when I press enter after I have type a classroom. The printf for "Please enter a time: ", did not come out. Why is this so??
void option1()
{
char* classroom;
int time;
printf("Please enter the classroom: ");
scanf_s("%s", &classroom);
printf("Please enter the time: ");
scanf_s("%d", &time);
}
Thanks for help :)