user-0 提问: VS访问冲突，VC正常运行（球球大佬看一眼吧）

回复:
user: user-1
content: 0xC0000005大多是指针越界或者访问未分配的地址导致。 字符数组全都是烫，是因为数组没有初始化，结构体申请完后， 需要memset下

user: user-2
content: #include <stdio.h> #include <stdlib.h> //#include <windows.h>  #define MAX 100  //书结构体 struct Book {     char book_name[30];     unsigned int book_id;     double book_price; };  //书录结构体 struct library {     struct Book book_array[MAX];     unsigned int book_num; };  //显示菜单 void show_menu() {     printf("SSSSSSSSSSSSSSSSSSSSSSSSSSS\n");     printf("                           \n");     printf("    图书超市管理系统v1.0   \n");     printf(" 1.图书基本信息管理        \n");     printf(" 2.购书结算处理            \n");     printf(" 3.售书历史记录            \n");     printf(" 0.退出系统                \n");     printf("                           \n");     printf("EEEEEEEEEEEEEEEEEEEEEEEEEEE\n"); }  //添加图书 void add_book(struct library * lib) {     if (lib->book_num >= MAX)     {         printf("书的数量已达最大值。\n");         system("pause");         system("cls");         return;     }     fflush(stdin);     printf("请输入书的名称:\n");     //scanf_s("%s", lib->book_array[lib->book_num].book_name);     scanf_s("%s", lib->book_array[lib->book_num].book_name, 30);     printf("请输入书的ID:\n");     //scanf_s("%ud", &lib->book_array[lib->book_num].book_id);     scanf_s("%u", &lib->book_array[lib->book_num].book_id);     printf("请输入书的价格:\n");     scanf_s("%lf", &lib->book_array[lib->book_num].book_price);     lib->book_num++;     printf("添加成功!\n");     system("pause");     system("cls"); }  //显示图书 void show_book(struct library * lib) {     if (lib->book_num == 0)     {         printf("当前记录为空。\n");         system("pause");         system("cls");         return;     }     int i = 0;     printf("书名\tID\t售价\n");     for (i = 0; i < lib->book_num; i++)     {         printf("%s\t%u\t%.2lf\n", lib->book_array[i].book_name, lib->book_array[i].book_id, lib->book_array[i].book_price);     }     system("pause");     system("cls"); }  //查找图书位置 int find_book(struct library * lib) { }  //图书基本信息管理 void book_management(struct library * lib) {     int choise;     system("cls");     while (1)     {         printf("***************************\n");         printf("*    图书基本信息管理     *\n");         printf("*1.添加图书               *\n");         printf("*2.删除图书               *\n");         printf("*3.修改图书               *\n");         printf("*4.查找图书               *\n");         printf("*5.展示图书               *\n");         printf("*0.退出功能               *\n");         printf("***************************\n");         scanf_s("%d", &choise);         switch (choise)         {             case 1:                 add_book(lib);                 break;             case 2:                 break;             case 3:                 break;             case 4:                 break;             case 5:                 show_book(lib);                 break;             case 0:                 return;             default:                 printf("输入错误，请重新选择！\n");                 system("pause");                 break;         }         system("cls");     } }  int main() {     int choise;     struct library lib;     lib.book_num = 0;     system("color f0");     printf("***************************\n");     printf("***************************\n");     printf("*                         *\n");     printf("*欢迎使用图书超市管理系统!*\n");     printf("*                         *\n");     printf("***************************\n");     printf("***************************\n");     system("pause");     system("cls");     while (1)     {         show_menu();         scanf_s("%d",&choise);         switch (choise)         {             case 1:                 book_management(&lib);                 break;             case 2:                 break;             case 3:                 break;             case 0:                 return 0;             default:                 printf("输入错误，请重新选择！");                 system("pause");                 break;         }         system("cls");     } } 供参考～  scanf_s对于%s需要多一个参数