commit
77fec02ccc
@ -0,0 +1,44 @@
|
||||
#ifndef __CONTACT_H__
|
||||
#define __CONTACT_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> //系统函数 实现某些函数调用等
|
||||
#include <string.h>
|
||||
#include <assert.h> //诊断程序是否有误
|
||||
|
||||
#define DEFAULT_SZ 3
|
||||
|
||||
#define NAME_MAX 20
|
||||
#define SEX_MAX 5
|
||||
#define TELE_MAX 12
|
||||
#define ADDR_MAX 30
|
||||
#define MAX 1000
|
||||
|
||||
typedef struct PeoInfo //结构体
|
||||
{
|
||||
char name[NAME_MAX];
|
||||
int age;
|
||||
char sex[SEX_MAX ];
|
||||
char tele[TELE_MAX];
|
||||
char addr[ADDR_MAX];
|
||||
}PeoInfo;
|
||||
|
||||
typedef struct Contact
|
||||
{
|
||||
PeoInfo* data;//存放数据
|
||||
int sz;//当前已有信息个数
|
||||
int capacity;//当前最大的容量
|
||||
}Contact, *pContact;
|
||||
|
||||
void InitContact(pContact pc); //初始化
|
||||
void DestroyContact(pContact pc);//释放动态内存开辟的空间
|
||||
void AddContact(pContact pc); //添加联系人
|
||||
void ShowContact(pContact pc);//显示联系人
|
||||
void DelContact(pContact pc);//删除联系人
|
||||
void SearchContact(pContact pc);//查找联系人
|
||||
void ModifyContact(pContact pc);//修改联系热
|
||||
void EmptyContact(pContact pc);//清空联系人
|
||||
void SaveContact(pContact pc);//保存信息到文件
|
||||
void LoadContact(pContact pc);//加载文件
|
||||
|
||||
#endif
|
@ -0,0 +1,31 @@
|
||||
# Project: ÏîÄ¿1
|
||||
# Makefile created by Dev-C++ 5.11
|
||||
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
OBJ = Contact.o test.o
|
||||
LINKOBJ = Contact.o test.o
|
||||
LIBS = -L"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -m32
|
||||
INCS = -I"C:/Program Files/Dev-Cpp/MinGW64/include" -I"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include"
|
||||
CXXINCS = -I"C:/Program Files/Dev-Cpp/MinGW64/include" -I"C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/Program Files/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++"
|
||||
BIN = ÏîÄ¿1.exe
|
||||
CXXFLAGS = $(CXXINCS) -m32
|
||||
CFLAGS = $(INCS) -m32
|
||||
RM = rm.exe -f
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom
|
||||
|
||||
all: all-before $(BIN) all-after
|
||||
|
||||
clean: clean-custom
|
||||
${RM} $(OBJ) $(BIN)
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||
|
||||
Contact.o: Contact.c
|
||||
$(CC) -c Contact.c -o Contact.o $(CFLAGS)
|
||||
|
||||
test.o: test.c
|
||||
$(CC) -c test.c -o test.o $(CFLAGS)
|
Binary file not shown.
@ -0,0 +1,82 @@
|
||||
[Project]
|
||||
FileName=ÏîÄ¿1.dev
|
||||
Name=ÏîÄ¿1
|
||||
Type=1
|
||||
Ver=2
|
||||
ObjFiles=
|
||||
Includes=
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=
|
||||
Linker=
|
||||
IsCpp=0
|
||||
Icon=
|
||||
ExeOutput=
|
||||
ObjectOutput=
|
||||
LogOutput=
|
||||
LogOutputEnabled=0
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=
|
||||
HostApplication=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
CommandLine=
|
||||
Folders=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=3
|
||||
CompilerSettings=0000000100000000000000000
|
||||
UnitCount=3
|
||||
|
||||
[VersionInfo]
|
||||
Major=1
|
||||
Minor=0
|
||||
Release=0
|
||||
Build=0
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
SyncProduct=1
|
||||
|
||||
[Unit3]
|
||||
FileName=Contact.h
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit1]
|
||||
FileName=Contact.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit2]
|
||||
FileName=test.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
@ -0,0 +1,18 @@
|
||||
[Editors]
|
||||
Order=0,2,1
|
||||
Focused=-1
|
||||
[Editor_0]
|
||||
CursorCol=4
|
||||
CursorRow=52
|
||||
TopLine=4
|
||||
LeftChar=1
|
||||
[Editor_1]
|
||||
CursorCol=28
|
||||
CursorRow=22
|
||||
TopLine=14
|
||||
LeftChar=1
|
||||
[Editor_2]
|
||||
CursorCol=48
|
||||
CursorRow=41
|
||||
TopLine=9
|
||||
LeftChar=1
|
Loading…
Reference in new issue