我正在运行一个有3个结构的程序,我在二进制文件中读/写的操作如下:
struct Medico
{
int Id_Doctor;
int Estado;
char Nombre[60];
char Clave_Acceso[20];
char Especialidad[40];
struct Medico *next;
};
typedef struct Medico *Medicazos;
typedef struct Medico Meds;
Medicazos Nuevo;
FILE *Archivaldo;
char especialida[40], password[20];
char nombre_doc[60];
int estado_doc, id_doc;
Archivaldo=fopen("md.dat", "rb");
fclose(Archivaldo);
if((Archivaldo=fopen("md.dat", "rb"))==NULL)
{
printf("No se pudo abrir el archivo de Medicos\n"); //couldnt open file msg
exit(1);
}
rewind(Archivaldo);
while(!feof(Archivaldo))
{
if(*Inicio != NULL) //read from file and write in struct
{
Nuevo = (Medicazos) malloc (sizeof(Meds)); //new=pointer
fread(&id_doc, sizeof(int), …Run Code Online (Sandbox Code Playgroud) g_timer_new如何工作?
有可能做一个
char timerz[50];
GTimer *timer
g_timer_start(GTimer *timer);
strcpy(timerz,(g_timer_elapsed(GTimer *timer))
Run Code Online (Sandbox Code Playgroud)
或者我该怎么做才能在gtk_frame中有一个计时器?
祝你今天愉快!:d