#include<iostream.h>
#include<fstream.h>
#include<stdlib.h>
#include<string.h>
struct Meetinglist
{
char name[10] ;
char number[50] ;
char department[40] ;
char address[40] ;
char time[15] ;
char moderator[20] ;
char recoder [15] ;
char presentmembers [300] ;
char digest[500];
};
void Add ( fstream ) ;
void CreatTxt ( fstream ) ;
void modification ( fstream ) ;
void Delete ( fstream ) ;
void Inquire( fstream );
void main ( )
{ int choice ;
fstream field ( "d:\\clot.dat" , ios::in|ios::out|ios::binary ) ;
if(!field)
{cerr<<"文件不能打开"<<endl;
return;
}
while ( choice )
{ cout << "**会议记录管理系统**\n" ;
cout << "1.添加会议记录:\n"
<< "2.创建TXT文档:\n"
<< "3.修改会议记录:\n"
<< "4.删除会议记录:\n"
<< "5.按不同字段(会议编号)查询会议记录和浏览所有会议记录信息:\n" << "0.退出!\n" ;
do
{
cin >> choice ;
}
while ( choice != 0 && choice != 1 && choice != 2 && choice != 3 && choice != 4 && choice !=5 ) ;
switch ( choice )
{
case 1 : Add ( field ) ; break ;
case 2 : CreatTxt ( field ) ; break ;
case 3 : modification ( field ) ; break ;
case 4 : Delete ( field ) ; break ;
case 5 : Inquire ( field ) ; break ;
case 0 : cout << "退出系统!\n" ; return ;
default:cout<<"输入错误,请重新输入\n";
}
}
field.close ( ) ;
}
void Add ( fstream f )
{
Meetinglist list ;
cout << "请输入会议名称:\n" ;
cin >> list.name ;
cout << "请输入会议编号(3位):\n" ;
cin >> list.number ;
cout << "請输入部门名称:\n" ;
cin >> list.department ;
cout << "请输入会议地点:\n" ;
cin >> list.address ;
cout << "请输入会议日期:\n" ;
cin >> list.time ;
cout << "请输入会议主持人:\n" ;
cin >> list.moderator ;
cout << "请输入会议记录人:\n" ;
cin >> list.recoder ;
cout << "请输入出席人员:\n" ;
cin >> list.presentmembers ;
cout << "请输入会议摘要:\n" ;
cin >> list.digest ;
f.write ( ( char* ) & list , sizeof ( Meetinglist ) ) ; }
void CreatTxt ( fstream f )
{
Meetinglist List ;
fstream ftxt ( "d:\\clot.txt" , ios::out ) ;
f.seekg ( 0 , ios::end ) ;
long posEnd = f.tellg ( ) ;
f.seekg ( 0 , ios::beg ) ;
do
{
f.read ( ( char* ) & List , sizeof ( Meetinglist ) ) ; ftxt << List.name << '\n'
<< List.number << '\n'
<< List.department << '\n'
<< List.address << '\n'
<< List.time << '\n'
<< List.moderator << '\n'
<< List.recoder << '\n'
<< List.presentmembers << '\n' << List.digest << endl ;
}
while ( posEnd != f.tellg ( ) ) ;
cout << "Txt文档已建立\n" ;
ftxt.close ( ) ;
return ;
}
void modification ( fstream f )
{
Meetinglist List ;
int a = 0 ;
int m = 0 ;
int choice ;
char num[50] ;
char information[50] ;
f.seekg ( 0 , ios::end ) ;
long posEnd = f.tellg ( ) ;
f.seekg ( 0 , ios::beg ) ;
cout << "*请输入要修改会议记录的编号:*\n" ; cin >> num ;
do
{
f.read ( ( char* ) & List , sizeof ( Meetinglist ) ) ; for ( int i = 0 ; i < 50 ; i++ )
{
if ( num[i] == List.number[i] ) m++ ;
if ( num[i] != List.number[i] )
{
m = 0 ;
break ;
}
}
}
while ( m != 50 && posEnd != f.tellg ( ) ) ;
if ( m <= 50 )
cout << "*找到这个会议*\n"
<< "1.修改会议名称:\n"
<< "2.修改会议编号:\n"
<< "3.修改部门名称:\n"
<< "4.修改会议地点:\n"
<< "5.修改会议日期:\n"
<< "6.修改会议主持人:\n"
<< "7.修改会议记录人:\n"
<< "8.修改出席人员:\n"
<< "9.修改会议摘要:\n"
<< "0.退出:\n" ;
if ( m != 50 )
{
cout << "*没有这个会议*!\n" ;
return ;
}
while ( choice )
{
do
{
cin >> choice ;
}
while ( choice != 1 && choice != 2 && choice != 3 && choice != 4 && choice != 5 &&
choice != 6 && choice != 7 && choice != 8 && choice != 9 && choice != 0 ) ;
switch ( choice )
{
case 1 : cin >> information ;
for ( a = 0 ; a < sizeof(List.name) ; a++ )
List.name[a]=information[a] ;
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ;
f.write ( ( char* ) & List , sizeof ( List ) ) ;
return ;
case 2 : cin >> information ;
for ( a = 0 ; a < sizeof(List.number) ; a++ )
List.number[a]=information[a] ;
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ;
f.write ( ( char* ) & List , sizeof ( List ) ) ;
return ;
case 3 : cin >> information ;
for ( a = 0 ; a < sizeof(List.department) ; a++ )
List.department[a]=information[a] ;
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ;
f.write ( ( char* ) & List , sizeof ( List ) ) ;
return ;
case 4 : cin >> information ;
for ( a = 0 ; a < sizeof(List.address) ; a++ )
List.address[a]=information[a] ;
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ;
f.write ( ( char* ) & List , sizeof ( List ) ) ;
return ;
case 5 : cin >> information ;
for ( a = 0 ; a < sizeof(List.time) ; a++ )
List.time[a]=information[a] ;
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ;
f.write ( ( char* ) & List , sizeof ( List ) ) ;
return ;
case 6 : cin >> information ;
for ( a = 0 ; a < sizeof(List.moderator) ; a++ ) List.moderator[a]=information[a] ; f.seekp(-long (sizeof(Meetinglist)),ios::cur) ; f.write ( ( char* ) & List , sizeof ( List ) ) ; return ;
case 7 : cin >> information ;
for ( a = 0 ; a < sizeof(List.recoder) ; a++ ) List.recoder[a]=information[a] ;
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ; f.write ( ( char* ) & List , sizeof ( List ) ) ; return ;
case 8 : cin >> information ;
for ( a = 0 ; a < sizeof(List.presentmembers) ; a++ ) List.presentmembers[a]=information[a] ; f.seekp(-long (sizeof(Meetinglist)),ios::cur) ; f.write ( ( char* ) & List , sizeof ( List ) ) ; return ;
case 9 : cin >> information ;
for ( a = 0 ; a < sizeof(List.digest) ; a++ ) List.digest[a]=information[a] ;
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ; f.write ( ( char* ) & List , sizeof ( List ) ) ; return ;
case 0 : cout << "退出!\n" ; return ;
}
}
}
void Delete ( fstream f )
{
Meetinglist list ;
int m = 0 ;
char a ;
char num[50] ;
char Fill[80] = { ' ' } ;
cout << "*请输入要删除的会议的编号Y/N:*" << endl ; cin >> num ;
f.seekg ( 0 , ios::end ) ;
long posEnd = f.tellg ( ) ;
f.seekg ( 0 , ios::beg ) ;
do
{
f.read ( ( char* ) & list , sizeof ( Meetinglist ) ) ; for ( int i = 0 ; i < 50 ; i++ )
{
if ( num[i] == list.number[i] ) m++ ;
if ( num[i] != list.number[i] )
{
m = 0 ;
break ;
}
}
}
while ( m != 50 && posEnd != f.tellg ( ) ) ; if ( m <= 50 )
cout << "*找到这个会议*\n" ;
if ( m !=50 )
{
cout << "*没有这个会议!*\n" ;
return ;
}
cout << "*确定删除这个会议?*" << endl ; do
{
cin >> a ;
}
while ( a != 'Y' && a != 'N' && a != 'y' && a != 'n') ;
if ( a == 'Y' || a == 'y' )
{
for ( int i = 0 ; i < sizeof(list.name) ; i++ ) {
list.name[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.number) ; i++ ) {
list.number[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.department) ; i++ ) {
list.department[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.address) ; i++ ) {
list.address[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.time) ; i++ ) {
list.time[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.moderator) ; i++ ) {
list.moderator[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.recoder) ; i++ ) {
list.recoder[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.presentmembers) ; i++ ) {
list.presentmembers[i] = Fill[i] ;
}
for ( i = 0 ; i < sizeof(list.digest) ; i++ ) {
list.digest[i] = Fill[i] ;
}
f.seekp(-long (sizeof(Meetinglist)),ios::cur) ; f.write ( ( char* ) & list , sizeof ( list ) ) ; return ;
}
if ( a == 'N' || a == 'n' )
return ;
}
void Inquire ( fstream f )
{int choice;
Meetinglist list ;
char num[50];
f.seekg( 0 , ios::end );
long posEnd = f.tellg();
cout<<"**查询会议资料**\n";
while (1)
{cout<<"请输入操作选项\n"
<<"1:按会议编号查询\t"
<<"2:浏览\t"
<<"0:退出\n";
cin>>choice;
switch ( choice )
{case 1:
{f.seekg( 0 , ios::beg );
cout<<"会议编号:\n";
cin>>num;
do
{f.read( (char*) & list , sizeof ( Meetinglist ) ) ;
} while (list.number !=num && f.tellg() != posEnd ); if (list.number == num)
cout<<list.number<<'\t'
<<list.name<<'\t'
<<list.department<<'\t'
<<list.address<<'\t'
<<list.time<<'\t'
<<list.moderator<<'\t'
<<list.recoder<<'\t'
<<list.presentmembers<<'\t'
<<list.digest<<endl;
else
{cout<<"*会议编号输入错误*\n";
continue;
}
break;
}
case 2:
{f.seekg ( 0 , ios::beg );
do
{f.read( (char*) & list , sizeof ( Meetinglist ) ) ; cout<<list.number<<'\t'
<<list.name<<'\t'
<<list.department<<'\t'
<<list.address<<'\t'
<<list.time<<'\t'
<<list.moderator<<'\t'
<<list.recoder<<'\t'
<<list.presentmembers<<'\t'
<<list.digest<<endl;
} } } while (list.number != num && f.tellg() != posEnd ); break; } case 0 : return; }
题目4会议记录管理系统内容及要求定义会议信息类classConference会议信息包括会议编号会议名称部门名称会议地点会议日期会…
理工大学课程设计题目会议记录管理系统院系计算机科学与技术学院网络工程系班级网络班学号080402姓名同组成员指导教师成绩20年0月…
滨江学院Java程序设计实习报告题目会议记录管理系统专业计算机系年级班级12级软件工程1班学号20xx2305047学生姓名何俊杰…
includeltiostreamhgtincludeltfstreamhgtincludeltstdlibhgtincludeltstringhgt…
会议管理系统需求说明书系统整体介绍本系统是应用于企业会议管理的会议管理系统实现自动管理会议室及时准确得知会议室空闲预定情况规范公司…
课程设计大作业报告课程名称程序设计基础课程设计设计题目某小型会议参会人员管理系统院系班级级计算机科学与技术班设计者学号指导教师设计…
最好用的无纸化会议管理系统你知道千亿以上的大公司一年要开多少视频或电话会议吗说出来一定会让你大吃一惊据不完全统计平安集团每年召开大…
视频会议管理系统一系统设计原则Android手机视频会议系统功能涵盖会议控制音视频传输录像播放以及会议终端几个方面总体实现会议多媒…
沈阳理工大学课程设计专用纸Noi沈阳理工大学课程设计专用纸No1沈阳理工大学课程设计专用纸No222类的设计说明定义类为struc…
万科房地产的会议管理系统20xx0824213051标签分类地产精髓召集人参会人员议程会议管理系统万科房地产东京房产会议是人们为了…
共青团广东金融学院委员会组织部十一、十二月份系统例会暨工作总结会议议程一:各团总支组织部做工作汇报议程二:团委组织部做工作汇报(一…