hello experts,
in the following code after welcome(); is executed the program quits.
welcome function just has some text and an if statement so if op = instructions it displays some instructions else just enters
so when i press instruction in the welcome(); the fgets is ignored and so does not read in
help pleaseeeeeeeeeeeeeeee.
Code:
#include<stdio.h>
#include<stdlib.h>
struct player
{
char name[20];
int score;
};
void welcome();
void rand_mines(char msweep[][]);
void printmatrix(char msweep[][],int r,char user_chart[][]);
int process(char msweep[][],int r,int c,char user_chart[][]);
void main()
{
char msweep[6][6] = {{'0'}};
int var,row,column;
char user_chart[6][6] = {{'0'}};
char user_name[20];
welcome();
printf("Enter Player Name : ");
// scanf("%c",user_name); // both input methods are not compiled
fgets(user_name,20,stdin);
return;
}