C++记事本3系列(V.2.4.20787)测试版

36 篇文章 0 订阅
11 篇文章 0 订阅

经测试发现此代码有BUG存在,正在修复中,敬请谅解。 

//
//Created by Carlgood.
//
//Note:This program is written in version DEV-C++ 5.11.
# include<iostream>
# include<cmath>
# include<string>
# include<cstring>
# include<cstdio>
# include<algorithm>
# include<stdlib.h>
# include<sstream>
# include<conio.h>
# include<windows.h>
# include<Windows.h> 
# include<vector>
# include<stack>
# include<queue>
# include<deque>
# include<iomanip> 
# include<bits/stdc++.h>
# define This_program_is_written_by_Carlgood_Programming_Studio 9876543210
using namespace std;
string txt;
string jsb[1008][1008]; 
unsigned long long gs=0;
bool fl=false;
bool fla=false;
struct xx
{
	string name={"empty"};//如果在这一行报错,先关掉所有exe窗口,然后再次编译运行这个程序就可以了。 
	unsigned long long sum=0;
	unsigned long long kb=0; 
}u[300003];
void tt()
{
	int i,j,sum=49;
    int x=30;
    int y=10;
    int TOP=1;
    int Bottom=10;
    int Left=0;
    int Right=111;
    int speed_x=1;
    int speed_y=1;
    while(sum)
    {
        sum--;
        if(y>Bottom||y<TOP)
        {
            speed_y=-speed_y;
        }
        if(x<Left||x>Right)
        {
            speed_x=-speed_x;
        }
        x=x-speed_x;
        y=y-speed_y;
        system("cls");
        for(j=0;j<=y;j++)
        {
            printf("\n");
        }
        for(i=0;i<=x;i++)
        {
            printf(" ");
        }
        printf("C.G.P.S\n");
        Sleep(1);
    }
    txt={"        ****    ****    ****    ***"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
    txt={"       *       *        *   *  *   "};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
    txt={"       *       ******   ****    ***"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
    txt={"       *       *   **   *          *"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
    txt={"        **** *  *** * * *    *  ***"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(1234);
	cout<<endl<<endl;
	txt={"*     *    ***       *     ***   ***  *****  ***  *****"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	txt={"*     *   *   *     **    *   * *   *    *  *   *    *"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	txt={" *   *       *     * *       *  *   *   *    ***    *"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	txt={"  * *       *     *****     *   *   *   *   *   *   *"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	txt={"   *   *  ***** *    *  * *****  ***    *    ***    *"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	Sleep(2345);
	system("cls");
}
int colour()
{
	system("cls");
	system("color 17");
	cout<<"0=黑色 1=蓝色 2=绿色 3=浅绿色 4=红色 5=紫色 6=黄色 7=白色 8=灰色 9=淡黑色 A=淡蓝色 B=淡浅绿色 C=淡红色 D=淡紫色 E=淡黄色 F=亮白色";
	cout<<endl;
	char a,b;
	cout<<"背景颜色:"; 
	cin>>a;
	cout<<"文字颜色:";
	cin>>b;
	cout<<"效果展示将在1秒钟后开始。";
	Sleep(999);
	fl=true;
	if(a=='0'&&b=='0') system("color 00");
	else if(a=='0'&&b=='1') system("color 01");
	else if(a=='0'&&b=='2') system("color 02");
	else if(a=='0'&&b=='3') system("color 03");
	else if(a=='0'&&b=='4') system("color 04");
	else if(a=='0'&&b=='5') system("color 05");
	else if(a=='0'&&b=='6') system("color 06");
	else if(a=='0'&&b=='7') system("color 07");
	else if(a=='0'&&b=='8') system("color 08");
	else if(a=='0'&&b=='9') system("color 09");
	else if(a=='0'&&(b=='A'||b=='a')) system("color 0A");
	else if(a=='0'&&(b=='B'||b=='b')) system("color 0B");
	else if(a=='0'&&(b=='C'||b=='c')) system("color 0C");
	else if(a=='0'&&(b=='D'||b=='d')) system("color 0D");
	else if(a=='0'&&(b=='E'||b=='e')) system("color 0E");
	else if(a=='0'&&(b=='F'||b=='f')) system("color 0F");
	else if(a=='1'&&b=='0') system("color 10");
	else if(a=='1'&&b=='1') system("color 11");
	else if(a=='1'&&b=='2') system("color 12");
	else if(a=='1'&&b=='3') system("color 13");
	else if(a=='1'&&b=='4') system("color 14");
	else if(a=='1'&&b=='5') system("color 15");
	else if(a=='1'&&b=='6') system("color 16");
	else if(a=='1'&&b=='7') system("color 17");
	else if(a=='1'&&b=='8') system("color 18");
	else if(a=='1'&&b=='9') system("color 19");
	else if(a=='1'&&(b=='A'||b=='a')) system("color 1A");
	else if(a=='1'&&(b=='B'||b=='b')) system("color 1B");
	else if(a=='1'&&(b=='C'||b=='c')) system("color 1C");
	else if(a=='1'&&(b=='D'||b=='d')) system("color 1D");
	else if(a=='1'&&(b=='E'||b=='e')) system("color 1E");
	else if(a=='1'&&(b=='F'||b=='f')) system("color 1F");
	else if(a=='2'&&b=='0') system("color 20");
	else if(a=='2'&&b=='1') system("color 21");
	else if(a=='2'&&b=='2') system("color 22");
	else if(a=='2'&&b=='3') system("color 23");
	else if(a=='2'&&b=='4') system("color 24");
	else if(a=='2'&&b=='5') system("color 25");
	else if(a=='2'&&b=='6') system("color 26");
	else if(a=='2'&&b=='7') system("color 27");
	else if(a=='2'&&b=='8') system("color 28");
	else if(a=='2'&&b=='9') system("color 29");
	else if(a=='2'&&(b=='A'||b=='a')) system("color 2A");
	else if(a=='2'&&(b=='B'||b=='b')) system("color 2B");
	else if(a=='2'&&(b=='C'||b=='c')) system("color 2C");
	else if(a=='2'&&(b=='D'||b=='d')) system("color 2D");
	else if(a=='2'&&(b=='E'||b=='e')) system("color 2E");
	else if(a=='2'&&(b=='F'||b=='f')) system("color 2F");
	else if(a=='3'&&b=='0') system("color 30");
	else if(a=='3'&&b=='1') system("color 31");
	else if(a=='3'&&b=='2') system("color 32");
	else if(a=='3'&&b=='3') system("color 33");
	else if(a=='3'&&b=='4') system("color 34");
	else if(a=='3'&&b=='5') system("color 35");
	else if(a=='3'&&b=='6') system("color 36");
	else if(a=='3'&&b=='7') system("color 37");
	else if(a=='3'&&b=='8') system("color 38");
	else if(a=='3'&&b=='9') system("color 39");
	else if(a=='3'&&(b=='A'||b=='a')) system("color 3A");
	else if(a=='3'&&(b=='B'||b=='b')) system("color 3B");
	else if(a=='3'&&(b=='C'||b=='c')) system("color 3C");
	else if(a=='3'&&(b=='D'||b=='d')) system("color 3D");
	else if(a=='3'&&(b=='E'||b=='e')) system("color 3E");
	else if(a=='3'&&(b=='F'||b=='f')) system("color 3F");
	else if(a=='4'&&b=='0') system("color 40");
	else if(a=='4'&&b=='1') system("color 41");
	else if(a=='4'&&b=='2') system("color 42");
	else if(a=='4'&&b=='3') system("color 43");
	else if(a=='4'&&b=='4') system("color 44");
	else if(a=='4'&&b=='5') system("color 46");
	else if(a=='4'&&b=='7') system("color 17");
	else if(a=='4'&&b=='8') system("color 48");
	else if(a=='4'&&b=='9') system("color 49");
	else if(a=='4'&&(b=='A'||b=='a')) system("color 4A");
	else if(a=='4'&&(b=='B'||b=='b')) system("color 4B");
	else if(a=='4'&&(b=='C'||b=='c')) system("color 4C");
	else if(a=='4'&&(b=='D'||b=='d')) system("color 4D");
	else if(a=='4'&&(b=='E'||b=='e')) system("color 4E");
	else if(a=='4'&&(b=='F'||b=='f')) system("color 4F");
	else if(a=='5'&&b=='0') system("color 50");
	else if(a=='5'&&b=='1') system("color 51");
	else if(a=='5'&&b=='2') system("color 52");
	else if(a=='5'&&b=='3') system("color 53");
	else if(a=='5'&&b=='4') system("color 54");
	else if(a=='5'&&b=='5') system("color 55");
	else if(a=='5'&&b=='6') system("color 56");
	else if(a=='5'&&b=='7') system("color 57");
	else if(a=='5'&&b=='8') system("color 58");
	else if(a=='5'&&b=='9') system("color 59");
	else if(a=='5'&&(b=='A'||b=='a')) system("color 5A");
	else if(a=='5'&&(b=='B'||b=='b')) system("color 5B");
	else if(a=='5'&&(b=='C'||b=='c')) system("color 5C");
	else if(a=='5'&&(b=='D'||b=='d')) system("color 5D");
	else if(a=='5'&&(b=='E'||b=='e')) system("color 5E");
	else if(a=='5'&&(b=='F'||b=='f')) system("color 5F");
	else if(a=='6'&&b=='0') system("color 60");
	else if(a=='6'&&b=='1') system("color 61");
	else if(a=='6'&&b=='2') system("color 62");
	else if(a=='6'&&b=='3') system("color 63");
	else if(a=='6'&&b=='4') system("color 64");
	else if(a=='6'&&b=='5') system("color 65");
	else if(a=='6'&&b=='6') system("color 66");
	else if(a=='6'&&b=='7') system("color 67");
	else if(a=='6'&&b=='8') system("color 68");
	else if(a=='6'&&b=='9') system("color 69");
	else if(a=='6'&&(b=='A'||b=='a')) system("color 6A");
	else if(a=='6'&&(b=='B'||b=='b')) system("color 6B");
	else if(a=='6'&&(b=='C'||b=='c')) system("color 6C");
	else if(a=='6'&&(b=='D'||b=='d')) system("color 6D");
	else if(a=='6'&&(b=='E'||b=='e')) system("color 6E");
	else if(a=='6'&&(b=='F'||b=='f')) system("color 6F");
	else if(a=='7'&&b=='0') system("color 70");
	else if(a=='7'&&b=='1') system("color 71");
	else if(a=='7'&&b=='2') system("color 72");
	else if(a=='7'&&b=='3') system("color 73");
	else if(a=='7'&&b=='4') system("color 74");
	else if(a=='7'&&b=='5') system("color 75");
	else if(a=='7'&&b=='6') system("color 76");
	else if(a=='7'&&b=='7') system("color 77");
	else if(a=='7'&&b=='8') system("color 78");
	else if(a=='7'&&b=='9') system("color 79");
	else if(a=='7'&&(b=='A'||b=='a')) system("color 7A");
	else if(a=='7'&&(b=='B'||b=='b')) system("color 7B");
	else if(a=='7'&&(b=='C'||b=='c')) system("color 7C");
	else if(a=='7'&&(b=='D'||b=='d')) system("color 7D");
	else if(a=='7'&&(b=='E'||b=='e')) system("color 7E");
	else if(a=='7'&&(b=='F'||b=='f')) system("color 7F");
	else if(a=='8'&&b=='0') system("color 80");
	else if(a=='8'&&b=='1') system("color 81");
	else if(a=='8'&&b=='2') system("color 82");
	else if(a=='8'&&b=='3') system("color 83");
	else if(a=='8'&&b=='4') system("color 84");
	else if(a=='8'&&b=='5') system("color 85");
	else if(a=='8'&&b=='6') system("color 86");
	else if(a=='8'&&b=='7') system("color 87");
	else if(a=='8'&&b=='8') system("color 88");
	else if(a=='8'&&b=='9') system("color 89");
	else if(a=='8'&&(b=='A'||b=='a')) system("color 8A");
	else if(a=='8'&&(b=='B'||b=='b')) system("color 8B");
	else if(a=='8'&&(b=='C'||b=='c')) system("color 8C");
	else if(a=='8'&&(b=='D'||b=='d')) system("color 8D");
	else if(a=='8'&&(b=='E'||b=='e')) system("color 8E");
	else if(a=='8'&&(b=='F'||b=='f')) system("color 8F");
	else if(a=='9'&&b=='0') system("color 90");
	else if(a=='9'&&b=='1') system("color 91");
	else if(a=='9'&&b=='2') system("color 92");
	else if(a=='9'&&b=='3') system("color 93");
	else if(a=='9'&&b=='4') system("color 94");
	else if(a=='9'&&b=='5') system("color 95");
	else if(a=='9'&&b=='6') system("color 96");
	else if(a=='9'&&b=='7') system("color 97");
	else if(a=='9'&&b=='8') system("color 98");
	else if(a=='9'&&b=='9') system("color 99");
	else if(a=='9'&&(b=='A'||b=='a')) system("color 9A");
	else if(a=='9'&&(b=='B'||b=='b')) system("color 9B");
	else if(a=='9'&&(b=='C'||b=='c')) system("color 9C");
	else if(a=='9'&&(b=='D'||b=='d')) system("color 9D");
	else if(a=='9'&&(b=='E'||b=='e')) system("color 9E");
	else if(a=='9'&&(b=='F'||b=='f')) system("color 9F");
	else if((a=='A'||a=='a')&&b=='0') system("color A0");
	else if((a=='A'||a=='a')&&b=='1') system("color A1");
	else if((a=='A'||a=='a')&&b=='2') system("color A2");
	else if((a=='A'||a=='a')&&b=='3') system("color A3");
	else if((a=='A'||a=='a')&&b=='4') system("color A4");
	else if((a=='A'||a=='a')&&b=='5') system("color A5");
	else if((a=='A'||a=='a')&&b=='6') system("color A6");
	else if((a=='A'||a=='a')&&b=='7') system("color A7");
	else if((a=='A'||a=='a')&&b=='8') system("color A8");
	else if((a=='A'||a=='a')&&b=='9') system("color A9");
	else if((a=='A'||a=='a')&&(b=='A'||b=='a')) system("color AA");
	else if((a=='A'||a=='a')&&(b=='B'||b=='b')) system("color AB");
	else if((a=='A'||a=='a')&&(b=='C'||b=='c')) system("color AC");
	else if((a=='A'||a=='a')&&(b=='D'||b=='d')) system("color AD");
	else if((a=='A'||a=='a')&&(b=='E'||b=='e')) system("color AE");
	else if((a=='A'||a=='a')&&(b=='F'||b=='f')) system("color AF");
	else if((a=='B'||a=='b')&&b=='0') system("color B0");
	else if((a=='B'||a=='b')&&b=='1') system("color B1");
	else if((a=='B'||a=='b')&&b=='2') system("color B2");
	else if((a=='B'||a=='b')&&b=='3') system("color B3");
	else if((a=='B'||a=='b')&&b=='4') system("color B4");
	else if((a=='B'||a=='b')&&b=='5') system("color B5");
	else if((a=='B'||a=='b')&&b=='6') system("color B6");
	else if((a=='B'||a=='b')&&b=='7') system("color B7");
	else if((a=='B'||a=='b')&&b=='8') system("color B8");
	else if((a=='B'||a=='b')&&b=='9') system("color B9");
	else if((a=='B'||a=='b')&&(b=='A'||b=='a')) system("color BA");
	else if((a=='B'||a=='b')&&(b=='B'||b=='b')) system("color BB");
	else if((a=='B'||a=='b')&&(b=='C'||b=='c')) system("color BC");
	else if((a=='B'||a=='b')&&(b=='D'||b=='d')) system("color BD");
	else if((a=='B'||a=='b')&&(b=='E'||b=='e')) system("color BE");
	else if((a=='B'||a=='b')&&(b=='F'||b=='f')) system("color BF");
	else if((a=='C'||a=='c')&&b=='0') system("color C0");
	else if((a=='C'||a=='c')&&b=='1') system("color C1");
	else if((a=='C'||a=='c')&&b=='2') system("color C2");
	else if((a=='C'||a=='c')&&b=='3') system("color C3");
	else if((a=='C'||a=='c')&&b=='4') system("color C4");
	else if((a=='C'||a=='c')&&b=='5') system("color C5");
	else if((a=='C'||a=='c')&&b=='6') system("color C6");
	else if((a=='C'||a=='c')&&b=='7') system("color C7");
	else if((a=='C'||a=='c')&&b=='8') system("color C8");
	else if((a=='C'||a=='c')&&b=='9') system("color C9");
	else if((a=='C'||a=='c')&&(b=='A'||b=='a')) system("color CA");
	else if((a=='C'||a=='c')&&(b=='B'||b=='b')) system("color CB");
	else if((a=='C'||a=='c')&&(b=='C'||b=='c')) system("color CC");
	else if((a=='C'||a=='c')&&(b=='D'||b=='d')) system("color CD");
	else if((a=='C'||a=='c')&&(b=='E'||b=='e')) system("color CE");
	else if((a=='C'||a=='c')&&(b=='F'||b=='f')) system("color CF");
	else if((a=='D'||a=='d')&&b=='0') system("color D0");
	else if((a=='D'||a=='d')&&b=='1') system("color D1");
	else if((a=='D'||a=='d')&&b=='2') system("color D2");
	else if((a=='D'||a=='d')&&b=='3') system("color D3");
	else if((a=='D'||a=='d')&&b=='4') system("color D4");
	else if((a=='D'||a=='d')&&b=='5') system("color D5");
	else if((a=='D'||a=='d')&&b=='6') system("color D6");
	else if((a=='D'||a=='d')&&b=='7') system("color D7");
	else if((a=='D'||a=='d')&&b=='8') system("color D8");
	else if((a=='D'||a=='d')&&b=='9') system("color D9");
	else if((a=='D'||a=='d')&&(b=='A'||b=='a')) system("color DA");
	else if((a=='D'||a=='d')&&(b=='B'||b=='b')) system("color DB");
	else if((a=='D'||a=='d')&&(b=='C'||b=='c')) system("color DC");
	else if((a=='D'||a=='d')&&(b=='D'||b=='d')) system("color DD");
	else if((a=='D'||a=='d')&&(b=='E'||b=='e')) system("color DE");
	else if((a=='D'||a=='d')&&(b=='F'||b=='f')) system("color DF");
	else if((a=='E'||a=='e')&&b=='0') system("color E0");
	else if((a=='E'||a=='e')&&b=='1') system("color E1");
	else if((a=='E'||a=='e')&&b=='2') system("color E2");
	else if((a=='E'||a=='e')&&b=='3') system("color E3");
	else if((a=='E'||a=='e')&&b=='4') system("color E4");
	else if((a=='E'||a=='e')&&b=='5') system("color E5");
	else if((a=='E'||a=='e')&&b=='6') system("color E6");
	else if((a=='E'||a=='e')&&b=='7') system("color E7");
	else if((a=='E'||a=='e')&&b=='8') system("color E8");
	else if((a=='E'||a=='e')&&b=='9') system("color E9");
	else if((a=='E'||a=='e')&&(b=='A'||b=='a')) system("color EA");
	else if((a=='E'||a=='e')&&(b=='B'||b=='b')) system("color EB");
	else if((a=='E'||a=='e')&&(b=='C'||b=='c')) system("color EC");
	else if((a=='E'||a=='e')&&(b=='D'||b=='d')) system("color ED");
	else if((a=='E'||a=='e')&&(b=='E'||b=='e')) system("color EE");
	else if((a=='E'||a=='e')&&(b=='F'||b=='f')) system("color EF");
	else if((a=='F'||a=='f')&&b=='0') system("color F0");
	else if((a=='F'||a=='f')&&b=='1') system("color F1");
	else if((a=='F'||a=='f')&&b=='2') system("color F2");
	else if((a=='F'||a=='f')&&b=='3') system("color F3");
	else if((a=='F'||a=='f')&&b=='4') system("color F4");
	else if((a=='F'||a=='f')&&b=='5') system("color F5");
	else if((a=='F'||a=='f')&&b=='6') system("color F6");
	else if((a=='F'||a=='f')&&b=='7') system("color F7");
	else if((a=='F'||a=='f')&&b=='8') system("color F8");
	else if((a=='F'||a=='f')&&b=='9') system("color F9");
	else if((a=='F'||a=='f')&&(b=='A'||b=='a')) system("color FA");
	else if((a=='F'||a=='f')&&(b=='B'||b=='b')) system("color FB");
	else if((a=='F'||a=='f')&&(b=='C'||b=='c')) system("color FC");
	else if((a=='F'||a=='f')&&(b=='D'||b=='d')) system("color FD");
	else if((a=='F'||a=='f')&&(b=='E'||b=='e')) system("color FE");
	else if((a=='F'||a=='f')&&(b=='F'||b=='f')) system("color FF");
	else
	{
		cout<<"\n输入不正确,请重新输入!";
		colour(); 
	}
	Sleep(1234);
	system("cls");
	return 0;
}
int yd()//如果在这一行报错,再次编译运行这个程序就可以了。 
{
	if(!fl) system("color 9f");
	char ch;
	txt={"现在进入程序引导部分。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(1234);
	system("cls");
	txt={"首先,你需要创建一个记事本,按a键就可以创建一个记事本。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"创建一个记事本后,你要给这个记事本起一个名字。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls"); 
	txt={"在记事本里面可以直接写内容,按回车键会转到下一行,但是,当你转到下一行以后,就不能回到上面的行里了。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"你可以在编辑记事本时按c键删除这个记事本,删除以后将无法找回此记事本,但可以在主界面按h键查看记事本的删除信息。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"按g键可以去回收站查看删除的记事本信息,输入你想查看的项目对应的序号就可以查看详细的信息(只展示最近的30万条信息)。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"在主页面时,按l(L)键可以开启调色板。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"在主页面时,按m键可以退出(结束)此程序。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"在编辑记事本页面,输入h可以查看当前记事本信息,删除时的c字符、查看信息时的h字符(单独)不算入大小和长度。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"在主页面输入d可以再次打开程序引导。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"在主页面时,按k键可以查看此软件信息。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"编辑记事本时,按z键可以保存当前记事本,但是保存以后不可以再次编辑。(只允许保存1000个记事本)"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"在主页面时,按u键可以查看已保存的记事本。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"记事本创建个数限制:300000个,记事本行数限制:1005行,记事本保存个数限制:1005个。"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|下一步(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	txt={"让我们开始创作吧!"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(900);
	cout<<"\n";
	txt={"|开始创作(按b键)|"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(44);
		cout<<txt[i];
	}
	txt.clear();
	while(1)
	{
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==98)
	        {
	           	break;
	        }
		}
	}
	system("cls");
	return 0; 
}
int xz()
{
	gs++;
	u[gs].sum=0;
	char ch; 
	txt={"请输入记事本名称:"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	cin>>u[gs].name;
	system("cls");
	for(int i=1;i<=7;i++)
	{
		cout<<"加载中";
		for(int j=1;j<=6;j++)
		{
			cout<<".";
			Sleep(88);
		}
		system("cls");
	}
	if(!fl) system("color F0"); 
	cout<<u[gs].name<<".txt\n________________________________________\n";
	u[gs].kb=0;
	int cnt=0;
	string s;
	string ss[1010];
	bool flaging=false;
	while(1)
	{
		if(cnt!=0&&!flaging)
		{
			ss[cnt-1]=s;
			cout<<"|"<<cnt<<"|";
		}
		if(cnt<=1005) getline(cin,s);
		else
		{
			cout<<"行数大于1005行,已达到极限,请删除或保存当前记事本!";
			int aaabbbccc;
			cout<<"输入1保存,输入2删除。\n";
			while(1)
			{
				cin>>aaabbbccc;
				if(aaabbbccc==1)
				{
					
				}
				else
				{
					system("cls");
	        		txt={"此记事本已删除,感谢您的使用!"};
					for(int i=0;i<txt.size();i++)
					{
							Sleep(88);
							cout<<txt[i];
					}
					txt.clear();
					Sleep(1234);
			       	return 0;
				}
			}
		}
		u[gs].sum+=s.size();
		for(int i=0;i<s.size();i++)
		{
			if(s[i]>='a'&&s[i]<='z')
			{
				u[gs].kb++;
			}
			else if(s[i]>='A'&&s[i]<='Z')
			{
				u[gs].kb++;
			}
			else if(s[i]>='0'&&s[i]<='9')
			{
				u[gs].kb++;
			}
			else
			{
				u[gs].kb+=2;
			}
		}
		if(!flaging) cnt++; 
	    if(s=="c")
	    {
	    	u[gs].kb--;
	    	u[gs].sum--;
	    	flaging=true;
	        txt={"此记事本将永久性删除,确定删除?(按e键确定)"};
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			txt.clear();
	        while(1)
	        {
	        	if(kbhit())
	        	{
	        		ch=getch();
	        		if(ch==101)
	        		{
	        			system("cls");
	        			txt={"此记事本已删除,感谢您的使用!"};
						for(int i=0;i<txt.size();i++)
						{
								Sleep(88);
								cout<<txt[i];
						}
						txt.clear();
						Sleep(1234);
			           	return 0;
					}
					else
					{
						flaging=false;
						cout<<endl;
						break;
					}
				}
			}
		}
		if(s=="z")
		{
			u[gs].kb--;
			u[gs].sum--;
			cnt--;
			system("cls");
			if(gs>1005)
			{
				txt={"对不起,记事本保存个数大于1005个,无法保存!系统将自动删除此记事本。"};
				for(int i=0;i<txt.size();i++)
				{
					Sleep(88);
					cout<<txt[i];
				}
				txt.clear();
			}
			else
			{
				for(int i=0;i<cnt;i++)
				{
					jsb[gs][i]=ss[i];
					cout<<"保存了"<<i+1<<"行,共"<<cnt<<"行。\n内容:"<<jsb[gs][i]<<"。\n保存内容:"<<ss[i]<<"\n";
					Sleep(168);
					system("cls"); 
				}
				txt={"此记事本已保存,您可以在保存列表中找到。感谢您的使用!"};
				for(int i=0;i<txt.size();i++)
				{
					Sleep(88);
					cout<<txt[i];
				}
				txt.clear();
				Sleep(1234);
			}
			return 0;
		}
		if(s=="h")
		{
			u[gs].kb--;
			u[gs].sum--;
			txt={"当前记事本信息:"};
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			Sleep(88);
			cout<<endl;
			txt.clear();
			txt={"记事本名称:"};
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			for(int i=0;i<u[gs].name.size();i++)
			{
				Sleep(88);
				cout<<u[gs].name[i];
			}
			txt.clear();
			Sleep(88);
			cout<<"。";
			Sleep(88);
			cout<<endl; 
			txt={"大小:"};
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			txt.clear();
			string kb;
			stringstream sin;
			sin<<u[gs].kb;
			sin>>kb;
			sin.clear();
			for(int i=0;i<kb.size();i++)
			{
				Sleep(88);
				cout<<kb[i];
			}
			txt={"个字节。"};
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			txt.clear();
			Sleep(88);
			cout<<endl;
			txt={"长度:"};
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			txt.clear();
			string sum;
			sin<<u[gs].sum;
			sin>>sum;
			sin.clear();
			for(int i=0;i<sum.size();i++)
			{
				Sleep(88);
				cout<<sum[i];
			}
			txt={"个字符。"};
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			txt.clear();
			Sleep(88);
			cout<<endl;
			txt={"按j键继续。"};//如果编译运行后这一行报错,输入分号运行后又会消失,这时候需要重启DEV-C++。 
			for(int i=0;i<txt.size();i++)
			{
				Sleep(88);
				cout<<txt[i];
			}
			txt.clear();
			while(1)
			{
				if(kbhit())
				{
					ch=getch();
					if(ch=='j')
					{
						cout<<endl;
						break;
					}
				}
			}
		}
	}
}
void bc()
{
	system("cls");
	cout<<"保存列表\n________________________\n";
	if(gs==0)
	{
		cout<<"暂无内容。";
	}
	else
	{
		cout<<"输入序号查询。\n";
		cout<<"序号|名称\n";
		for(unsigned long long i=1;i<=gs;i++)
		{
			cout<<"|"<<i<<"|";
			cout<<u[i].name;
			cout<<endl;
		}
		unsigned long long xh;
		cin>>xh;
	    cout<<"第"<<xh<<"个保存的记事本信息:\n";
		cout<<"保存的记事本名称:"<<u[xh].name<<endl;
		cout<<"大小:"<<u[xh].kb<<"个字节\n";
		cout<<"长度:"<<u[xh].sum<<"个字符\n";
		cout<<"内容:\n";
		cout<<"________________________________________________________________________________________________________________________\n";
		int i=1;
		while(!jsb[xh][i].empty())
		{
			cout<<"|"<<i<<"|"<<jsb[xh][i]<<endl;
			i++;
		}
		cout<<"________________________________________________________________________________________________________________________\n";
	}
	cout<<"\n按i返回。";
	char ywf;
	while(1)
	{
		if(kbhit())
		{
			ywf=getch();
			if(ywf=='i')
			{
				system("cls");
				break;
			}
		}
	}
	system("cls");
}
int main()
{
	system("title 记事本-Carlgood Programming Studio-V.2.4.20787");
	if(!fl) system("color 17");
	tt();
	txt={"Carlgood Programming Studio"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	txt={"     Carlgood编程工作室"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	Sleep(3456);
	char ch;
	system("cls");
	txt={"欢迎使用记事本!"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	cout<<endl;
	txt={"---------"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	txt={"Carlgood Programming Studio(C.G.P.S)出品"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(2345);
	system("cls");
	cout<<"新建账号\n____________________\n";
	txt={"请输入您的昵称:"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	string Name; 
	txt.clear();
	cin>>Name;
	txt={"请输入您的密码:"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	string mm; 
	txt.clear();
	cin>>mm;
	Sleep(567);
	system("cls");
	txt={"创建成功!"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	Sleep(1234);
	system("cls");
	txt={"请问您需要程序引导吗?需要请按f,不需要请按任意键。\n"};
	for(int i=0;i<txt.size();i++)
	{
		Sleep(88);
		cout<<txt[i];
	}
	txt.clear();
	char sd;
	while(1)
	{
		if(kbhit())
		{
			sd=getch();
			if(sd==102)
			{
				Sleep(567);
				system("cls");
				yd();
				break; 
			}
			else
			{
				txt={"在主页面按d键可以打开程序引导。"};
				for(int i=0;i<txt.size();i++)
				{
					Sleep(88);
					cout<<txt[i];
				}
				txt.clear();
				Sleep(987);
				break;
			}
		}
	}
	system("cls");
	while(!fla)
	{
		cout<<"Hi,"<<Name<<endl;
		cout<<"_________________\n";
		cout<<"|欢迎使用记事本!|\n";
		cout<<"|  C.G.P.S 创作 |\n";
		cout<<"|按a键新建记事本|\n";
		cout<<"| 按h键查看删除 |\n";
		cout<<"| 的记事本信息。|\n";
		cout<<"#################\n";
		if(kbhit())
	    {
	        ch=getch();
	        if(ch==97)
	        {
	        	system("cls");
	           	if(gs<=300000) xz();
	           	else
	           	{
	           		cout<<"非常抱歉,您创建的记事本个数大于了300000个的极限,不可以再创建记事本了。";
				}
	        }
	        else if(ch==104)
			{
				system("cls");
				cout<<"回收站\n________________________\n";
				if(gs==0)
				{
					cout<<"暂无内容。";
				}
				else
				{
					cout<<"输入序号查询。\n";
					cout<<"序号|名称\n";
					for(unsigned long long i=1;i<=gs;i++)
					{
						cout<<"|"<<i<<"|";
						cout<<u[i].name;
						cout<<endl;
					}
					unsigned long long xh;
					cin>>xh;
	        		cout<<"第"<<xh<<"个删除的记事本信息:\n";
					cout<<"删除的记事本名称:"<<u[xh].name<<endl;
					cout<<"大小:"<<u[xh].kb<<"个字节\n";
					cout<<"长度:"<<u[xh].sum<<"个字符";
				}
				cout<<"\n按i返回。";
				char ywf;
				while(1)
				{
					if(kbhit())
					{
						ywf=getch();
						if(ywf=='i')
						{
							system("cls");
							break;
						}
					}
				}
				system("cls");
			}
			else if(ch=='k')
			{
				system("cls");
				cout<<"软件信息\n_____________________________________\n";
				cout<<"软件名称:记事本\n";
				cout<<"软件版本:V.2.4.20787\n";
				cout<<"软件开发者:Carlgood Programming Studio(C.G.P.S)\n";
				cout<<"软件当前版本更新日期:2023年11月2日\n";
				cout<<"软件编辑语言:Dev-C++ 5.11\n";
				cout<<"软件当前版本新功能:1、新增保存功能2、记事本编辑和创建有限制,详情请看程序引导\n"; 
				cout<<"软件下一功能:1、修复已知问题\n";
				cout<<"软件下一版本:V.2.5.66283\n";
				cout<<"软件编译运行时长:约3~3.5秒\n";
				cout<<"软件编辑行数(当前版本):1408行,相较于上一版本增加204行\n";
				cout<<"软件代码长度:34477个字符,相较于上一版本增加3949个字符\n"; 
				cout<<"按i键继续\n";
				char ywf;
				while(1)
				{
					if(kbhit())
					{
						ywf=getch();
						if(ywf=='i')
						{
							system("cls");
							break;
						}
					}
				}
				system("cls");
			}
			else if(ch=='l')
			{
				system("cls");
				colour();
			}
			else if(ch=='m')
			{
				char ios;
				cout<<"确定要退出吗?确定请按e键。";
				while(1)
				{
					if(kbhit())
					{
						ios=getch();
						if(ios=='e')
						{
							system("cls");
							fla=true;
						}
						break;
					}
				}
			}
			else if(ch=='d')
			{
				Sleep(1234);
				system("cls");
				yd();
			}
			else if(ch=='u')
			{
				Sleep(1234);
				system("cls");
				bc();
			}
		}
		system("cls");
	}
	cout<<"The program has ended.\n";
	Sleep(765);
	cout<<"Back to zero.\n";
	Sleep(765);
	cout<<"The program is empty.";
	Sleep(2345);
	system("cls");
	cout<<"^v^C.G.P.S";
	return 0;
}

  • 7
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值