91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4KB
    文件類型: .gz
    金幣: 1
    下載: 1 次
    發布日期: 2021-06-17
  • 語言: 數據庫
  • 標簽: 源代碼??

資源簡介

C語言學生成績管理系統:使用curses函數庫和MySQL數據庫--源碼

資源截圖

代碼片段和文件信息

#include?“student.h“

void?Add_student(MYSQL?*connection)
{

int i;
int row?=?title_ROW?+?3;
char temp[50];
int number;
char insert[512];
Stu_info?*stu;

stu?=?malloc(sizeof(Stu_info));
title();
mvprintw(MESSAGE_ROW?title_COL?-?20?“the?number?of?student?with?you?want?to?add(q?to?exit):?“);
wgetstr(stdscr?temp);
if?(strcmp(temp?“q“)?==?0)
return;
number?=?atoi(temp);

title();
for?(i?=?0;?i? mvprintw(MESSAGE_ROW?title_COL?-?5?“student?%d:“?i?+?1);
mvprintw(row++?MESSAGE_COL?“?stu_id:?“);
wgetstr(stdscr?temp);
stu->stu_id?=?atoi(temp);
Read_stu_info(stu);
sprintf(insert?“INSERT?INTO?stu_information(stu_id?stu_name?stu_sex?stu_age?chinese?math?english)\
VALUES(%d?‘%s‘?‘%s‘?%d?%f?%f?%f)“?stu->stu_id?stu->name?stu->sex?stu->age?stu->chinese?stu->math?stu->english);
if?(mysql_query(connection?insert))?{
title();
mvprintw(MESSAGE_ROW?MESSAGE_COL?“add?failure:?%s\n“?mysql_error(connection));
refresh();
sleep(1);
return;
}else?{
mvprintw(MESSAGE_ROW?+?10?MESSAGE_COL?“add?success“);
refresh();
sleep(1);
}
refresh();
row?=?title_ROW?+?3;
title();
}
}

評論

共有 條評論