main.cpp

来自「自己的VC课程设计,呵呵也许有点简陋单对于初学者应该有点用途,里面用到类的知识对」· C++ 代码 · 共 34 行

CPP
34
字号
#include <iostream>	
#include <conio.h>		//putch()和getch()
#include <string>
#include "Funtion.h"
#include "Peo.h"
using namespace std;

//程序入口函数
int main()
{
	//设置标题
	system("title 2008届海南大学应用技术学院计算机科学与技术通讯录");
	//设置控制台的颜色,参数用两位的16进制数,第一个设置背景,第二个则为前景
	system("color 0A");
 	Nothing_Cout();		
		//获取管理员帐户和密码
	    string name;
		string password;
		cout <<endl<< "                             帐号: ";
		cin >> name;
		cout <<endl<< "                             密码: ";
	    cin >> password;
		if ((password=="123") && (name=="admin"))
		{ Form1_Show(); }
		else
		{
		 cout <<endl<< "               你输入的   密码  不正确 ";
		 //暂停
		 system("pause");
		 system("cls");main();
		}
 return 0;
}

⌨️ 快捷键说明

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