hi friends I am new here I want you to help me in this program I am using a textbox. it turns out that the information I want to save it in a text file but that the user names the text file I think the way I keep it is bad
void admpacientes()
{
char nfichero[50];
gotoxy(4,5);printf("ADMINISTRACION DEL PACIENTE");
gotoxy(1,8);printf("NOMBRE:");
textbox nombre(8,8,20,19);
nombre.Mostrar();
nombre.Capturar();
gotoxy(1,11);printf("APELLIDO:");
textbox apellido(10,11,20,19);
apellido.Mostrar();
apellido.Capturar();
gotoxy(35,11);printf("EDAD:");
textbox edad(40,11,5,5);
edad.Mostrar();
edad.Capturar();
gotoxy(1,15);printf("DIRECCION:");
textbox direccion(11,15,35,30);
direccion.Mostrar();
direccion.Capturar();
gotoxy(50,15);printf("CELULAR:");
textbox cel(58,15,15,13);
cel.Mostrar();
cel.Capturar();
gotoxy(1,19);printf("REGION:");
textbox rg(10,19,15,13);
rg.Mostrar();
rg.Capturar();
gotoxy(35,19);printf("PAIS:");
textbox pais(40,19,15,13);
pais.Mostrar();
pais.Capturar();
gotoxy(1,22);printf("INGRESE EL NOMBRE DEL ARCHIVO DONDE DESEA GUARDAR LA INFORMACION DEL PACIENTE: ");
scanf("%s",&nfichero);
FILE *archivo;
archivo=fopen("nfichero.txt","w"); //para escritura
fprintf(archivo,"%s\n%s\n,%d\n,%s\n,%d\n,%s\n,%s\n",nombre.Texto(),apellido.Texto(),edad.Texto(),direccion.Texto(),cel.Texto(),rg.Texto(),pais.Texto());
fclose(archivo);
getch();
system("CLS");
}//fin depantalla administrador de pacientes