资源简介
实现类似于QQ的注册登录功能,可以实现多个窗口或局域网进行多个用户注册或登录,并进行数据保存。
代码片段和文件信息
#include “StdAfx.h“
#include “List.h“
PERSON *g_pHead;
PERSON *g_pEnd;
void CreateList(char *szBufId char *szBufPass)
{
if (NULL == g_pHead)
{
PERSON *pNode = new PERSON;
pNode->m_pNext = NULL;
pNode->m_pLast = NULL;
strcpy(pNode->m_szBufIdszBufId);
strcpy(pNode->m_szBufPassszBufPass);
g_pHead = pNode;
g_pEnd = pNode;
}
}
void AddNode(char *szBufId char *szBufPass)
{
if (NULL != g_pHead)
{
PERSON *pNode = new PERSON;
g_pEnd->m_pNext = pNode;
g_pHead->m_pLast = g_pEnd;
pNode->m_pNext = NULL;
strcpy(pNode->m_szBufIdszBufId);
strcpy(pNode->m_szBufPassszBufPass);
g_pEnd = pNode;
}
}
PERSON* FindNode(char *szBufId)
{
if (NULL != g_pEnd && NULL != g_pHead)
{
PERSON *pNode = g_pHead->m_pNext;
while(pNode != NULL)
{
if (0 == strcmp(pNode->m_szBufIdszBufId))
{
return pNode;
}
pNode = pNode->m_pNext;
}
}
return NULL;
}
void OpenList()
{
char szID[20] = ““;
char szPsw[20] = ““;
FILE *pFile = fopen(“1.txt““r+“);
while(EOF != fscanf(pFile szID))
{
fscanf(pFile “%s“ szID);
fscanf(pFile “%s“ szPsw);
AddNode(szID szPsw);
}
fclose(pFile);
}
void WriteList()
{
FILE *pFile = fopen(“1.txt““w+“);
if (g_pHead != NULL)
{
PERSON *pNode = g_pHead->m_pNext;
while(NULL != pNode)
{
char szPwd[255] = ““;
char szId[255] = ““;
strcpy(szIdpNode->m_szBufId);
strcpy(szPwdpNode->m_szBufPass);
for (int i = 0;i < 255; i++)
{
fputc(szId[i]pFile);
if (szId[i] == ‘\0‘)
{
fputc(‘\n‘pFile);
for (int j = 0;j < 255;j++)
{
fputc(szPwd[j]pFile);
if (szId[j] == ‘\0‘)
{
break;
}
}
break;
}
}
fputc(‘\n‘pFile);
pNode = pNode->m_pNext;
}
}
fclose(pFile);
}属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-08-12 02:46 WindowRegis\
文件 264 2018-08-08 14:54 WindowRegis\Proto.h
目录 0 2018-08-12 02:46 WindowRegis\Recver\
文件 98 2018-08-10 11:00 WindowRegis\Recver\1.txt
目录 0 2018-08-12 02:47 WindowRegis\Recver\Debug\
文件 26101 2018-08-10 09:49 WindowRegis\Recver\Debug\List.obj
文件 266303 2018-08-10 09:49 WindowRegis\Recver\Debug\Recver.exe
文件 400848 2018-08-10 09:49 WindowRegis\Recver\Debug\Recver.ilk
文件 52119 2018-08-09 19:31 WindowRegis\Recver\Debug\Recver.obj
文件 5978632 2018-08-08 15:43 WindowRegis\Recver\Debug\Recver.pch
文件 795648 2018-08-10 09:49 WindowRegis\Recver\Debug\Recver.pdb
文件 132074 2018-08-08 15:43 WindowRegis\Recver\Debug\StdAfx.obj
文件 205824 2018-08-10 11:00 WindowRegis\Recver\Debug\vc60.idb
文件 446464 2018-08-10 09:49 WindowRegis\Recver\Debug\vc60.pdb
文件 22295 2018-08-08 14:56 WindowRegis\Recver\Debug\WinClient.obj
文件 1904 2018-08-09 19:33 WindowRegis\Recver\List.cpp
文件 376 2018-08-08 19:22 WindowRegis\Recver\List.h
文件 1208 2018-08-08 14:54 WindowRegis\Recver\ReadMe.txt
文件 2506 2018-08-09 19:31 WindowRegis\Recver\Recver.cpp
文件 4739 2018-08-08 14:54 WindowRegis\Recver\Recver.dsp
文件 246 2018-08-10 11:00 WindowRegis\Recver\Recver.plg
目录 0 2018-08-12 02:46 WindowRegis\Recver\Release\
文件 4682 2018-08-08 14:56 WindowRegis\Recver\Release\List.obj
文件 65536 2018-08-08 14:57 WindowRegis\Recver\Release\Recver.exe
文件 5743 2018-08-08 14:57 WindowRegis\Recver\Release\Recver.obj
文件 5539220 2018-08-08 14:59 WindowRegis\Recver\Release\Recver.pch
文件 3421 2018-08-08 14:59 WindowRegis\Recver\Release\StdAfx.obj
文件 74752 2018-08-08 15:00 WindowRegis\Recver\Release\vc60.idb
文件 7141 2018-08-08 14:59 WindowRegis\Recver\Release\WinClient.obj
文件 293 2018-08-08 14:54 WindowRegis\Recver\StdAfx.cpp
文件 731 2018-08-08 14:54 WindowRegis\Recver\StdAfx.h
............此处省略33个文件信息
- 上一篇:微机课设报告.doc
- 下一篇:蓝牙显示温湿度
相关资源
- 用友NC开发API字典
- Web Api 通过文件流 文件到本地
- Spire API文档
- ectouch最新版JSAPI微信支付V3插
- Servlet API中文文档
- jstl-api-1.2和jstl-impl-1.2
- hidusage.h hidpi.h 等USB开发用头文件
- MP3文件ID3v2ID3v2APEv2标签读取
- OpenGL文档,api大全,可直接查询函数
- 课程作业:模拟仓库管理系统
- nVidia 控制面板 API
- IpHlpApi.h&IpHlpApi.lib
- 一个简单实用个人日记管理系统
- 带时间温度显示的室内灯光控制系统
- 应用接口支持库1.1版eAPI
- 手机短信api接口(源代码)
- 成都MAPINFO格式电子地图
- 成绩管理系统(数据结构)
- FIR低通滤波器 ccs运行环境
- zlib 最新 1.2.8 win32 win64 编译好的dll
- ATA(ATAPI)接口指令协议硬盘基础知识
- WinAPI 函数库(大全)
- 串口操作类(justinio)
- 易语言京喜拼拼API协议模块
- Win32 API大全.chm
- RapidIO 2.2 Specification
- RapidIO_Rev_2.2_Specification
- 百度API车牌识别DEMO.rar
- 易语言API的用法之beep源码
- eetop.cn_eetop.cn_hfss15_win32crack
川公网安备 51152502000135号
评论
共有 条评论