loginshow.h

来自「用C++实现的一个职工工资管理系统」· C头文件 代码 · 共 58 行

H
58
字号
#ifndef LOGINSHOW_H
#define LOGINSHOW_H

#include <iostream>
#include <string>
#include <process.h>
#include <iomanip>

using namespace std;

void loginShow()
{
   char line[]={"━━━━━━━━━━"};
   char bar[]={"...."};
   int ii,j,k=0,x=0,yy=0;    
   for(ii=1;ii<=strlen(line)/2;)
   {
       system("cls");
       for(j=0;j<9;j++)   //改变行坐标
           cout<<endl;
       for(j=0;j<(75-strlen(line))/2;j++) //改变列坐标
           cout<<" ";
       for(j=1;j<=ii;j++)            //进度显示器
           cout<<"■";
       for(x=strlen(line)/2;x>ii;x--)
           cout<<"□";
       if(k==4)
           ii++;
       cout<<endl;    
       for(j=0;j<(75-strlen(line))/2;j++)    //行坐标定位
           cout<<" ";
       cout<<line;            //输出线条
       cout<<endl;
       for(j=0;j<(65-strlen(bar))/2;j++)
           cout<<" ";
       cout<<(ii-1)*10<<"% Loading";
       cout.write(bar,k);
       cout<<endl;
       for(j=0;j<10;j++)
           cout<<endl;
       for(j=0;j<24;j++)
           cout<<" ";
       cout<<"      ** 欢迎使用! **"<<endl;
       for(j=0;j<24;j++)
           cout<<" ";
       for(j=0;j<=12;j++)
           cout<<"─";
       cout<<endl;
       for(j=0;j<1000;j++);   //延时效果
       k++;
       if(k>4)
           k=0;
   }
    system("cls");   //清屏函数

}

#endif

⌨️ 快捷键说明

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