说明:c++简单实现 信息添加、显示、删除
// wuliu.cpp : by lip
//
#include "stdafx.h"
#include<stdio.h>
#include<stdlib.h>
#include <fstream.h>
#include <iostream.h>
#include <cstring>
#include <iomanip>
struct Product {
char name[20];
int id;
struct Product *next;
};
struct Product *Head;
struct Product *add(struct Product *h);
void show();
void save(struct Product *h);
void del();
void choice();
void main_init();
struct Product *add(struct Product *h){
system("cls");
int n=0;
int i=0;
h = NULL;
struct Product *p;
printf("\n");
printf("请输入总物流记录数:");
scanf("%d",&n);
for (i=0;i<n;i++)
{
p=(struct Product *)malloc(sizeof(struct Product));
printf("名称:");
scanf("%s",&p->name);
printf("编号:");
scanf("%d",&p->id);
printf(" -------------- \
用 C++实现的简单物流信息存储
最新推荐文章于 2024-06-15 14:26:50 发布