C语言餐饮菜品评价管理系统完整源码1000行代码可接定制

在这里插入图片描述
需要完整源码可看昵称练好
下面展示一些 内联代码片

// A code block
var foo = 'bar';
// An highlighted block
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_RESTAURANTS 100
#define MAX_USERS 100
// 定义结构体
typedef struct {
	int CommentId;
	int UserId; 
    int restaurantId;
    char restaurantName[50];
    char time[50];
    char comment[100];
    int rating;
    char content[100];
    char username[50];
} Comment;

typedef struct {
    int restaurantId;
    char name[50];
    char introduction[100];
    char phone[20];
    char address[100];
    int isOpen;
    char openingHours[50];
    int rating;
    char description[200];

} Restaurant;

typedef struct {
    int id;
    char name[50];
    char description[100];
    char cuisine[50];
    char type[50];
    int weight;
    float price;
} Dish;

typedef struct {
    int age;
    int UserId;
    char username[50];
    char name[50];
    char password[50];
    char realName[50];
    char phone[20];
    char hobby[50];
    char address[100];
    char remark[100];
    char note[200];

} User;

// 初始化数据
    Restaurant restaurants[100];
    int restaurantCount = 0;

    Dish dishes[1000];
    int dishCount = 0;

    User users[100];
    int userCount = 0;

    Comment comments[1000];
    int commentCount = 0;

// 函数声明
//餐厅模块 
void addRestaurant(Restaurant* restaurants, int* count);
void deleteRestaurant(Restaurant* restaurants, int* count);
void searchRestaurant(Restaurant* restaurants, int count);
void updateRestaurant(Restaurant* restaurants, int count);
void displayAllRestaurants(Restaurant* restaurants, int count);
void saveRestaurantsToFile(Restaurant* restaurants, int count);
void loadRestaurantsFromFile(Restaurant* restaurants, int* count); 
//菜品模块 
void addDish(Dish* dishes, int* count);
void deleteDish(Dish* dishes, int* count);
void searchDish(Dish* dishes, int count);
void updateDish(Dish* dishes, int count);
void saveDishesToFile(Dish* dishes, int count);
void displayAllDishes(Dish* dishes, int count);
void displayDishCount(int count);
void loadDishesFromFile(Dish* dishes, int* count);
//用户模块 
void addUser(User* users, int* count);
void deleteUser(User* users, int* count);
void searchUser(User* users, int count);
void updateUser(User* users, int count);
void saveUsersToFile(User* users, int count); 
void loadUsersFromFile(User* users, int* count);
//评价模块 
void addComment(Comment* comments, int* commentCount, User* users, int userCount, Restaurant* restaurants, int restaurantCount);
void deleteComment(Comment* comments, int* count);
void searchComment(Comment* comments, int count);
void updateComment(Comment* comments, int count);
void saveCommentsToFile(Comment* comments, int count);
void printAllComments(Comment* comments, int commentCount);
void loadReviewsFromFile(Comment* comments, int* commentCount);
// 主函数
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值