⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 circlist_josephus3_4.cpp

📁 循环链表的应用 循环链表的应用 很方便的实现
💻 CPP
字号:
// Circlist_Josephus3_4.cpp : 定义控制台应用程序的入口点。
// ///////////////////////////////////////////////////////////////////////////////////////
//    This program mainly introduces how to implement circlelink_list manipulation and  //
// carry out a application applied by this method,which is run by taking a example of   //
// string data type.you can test it by more data type due to its'  template mechanism . //
// owing to author's limited coding ability,it must contain many bugs and I sincerely   //
// expect some reader pointed them to me,that will be appriciated for me!               //
//                                                             written by:jay0518       //
//                                                                   date:2006/7/26     //
/////////////////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include <iostream>
#include <string>
#include "Source1.cpp"
using namespace std;
extern const int MaxSize;

//this is main fuction.
int _tmain(int argc, _TCHAR* argv[])
{
	int number=0,start=0,peopleNum=0;
	cout<<endl<<"please input the number of interval,\n";
	cout<<"the start position and the number people(<"<<MaxSize<<")participated in:";
	cin>>number>>start>>peopleNum;
	if(peopleNum>MaxSize){
		cout<<endl<<"Too many people beyond MaxSize";
		return 0;
	}
	CirclJosephus_List<string>* myJosephus=new CirclJosephus_List<string>("Header",number,start,peopleNum);
	myJosephus->initalList();
	if(!myJosephus->Run())
	cout<<endl<<"A error happens due to illegal paramters inputed!";
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -