一个简单的网址大全1.1.0(C++)

2021/9/20 20:26:53

本文主要是介绍一个简单的网址大全1.1.0(C++),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

前言:

这几天在反复琢磨饼干的代码,试着写了一个“低配高级”版(其实就是没饼干的厉害),还设计了一个logo(logo其实还是彩虹猫)

奉上代码: 

#include<bits/stdc++.h>
#include "stdio.h"
#include "windows.h"
using namespace std;
string str(string n) {
	n = "start " + n;
	return n;
}
void ydgb(int x, int y)
{
	COORD pos = { x,y };
	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleCursorPosition(hOut, pos);
}
int main() {
	system("mode con cols=60 lines=30");
	for(int i=1;; i++) {
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
		cout<<"                ##           ##"<<endl;
		cout<<"                #  #       #  #"<<endl;
		cout<<"                #   # # # #   # "<<endl;
		cout<<"               #               #"<<endl;
		cout<<"             #     ";
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
		cout<<"#      #      ";
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
		cout<<"#"<<endl;
		cout<<"             #                   # "<<endl;
		cout<<"               #    ";
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
		cout<<"|__|__|    ";
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
		cout<<"#"<<endl;
		cout<<"                 # # # # # # #"<<endl;
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
		
		for(int i=1; i<=10; i++)
			cout<<" ";
		for(int i=1; i<=40; i++)
			cout<<"-";
		cout<<endl;
		for(int i=1; i<=10; i++)
			cout<<" ";
		cout<<"|";
		for(int i=1; i<=23; i++)
			cout<<" ";
		cout<<"按Enter打开网页";
		cout<<"|"<<endl;
		for(int i=1; i<=10; i++)
			cout<<" ";
		for(int i=1; i<=40; i++)
			cout<<"-";
		string n;
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
		ydgb(11,9);
		cin>>n;
		n=str(n);
		system(&n[0]);
		system("cls");
	}
}

如果有什么建议的话,还请多多指教!!! 



这篇关于一个简单的网址大全1.1.0(C++)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程