圣诞树代码特效如下:
#include <bits/stdc++.h>
#include <windows.h>
#include <conio.h>
HWND hwnd=GetForegroundWindow();
using namespace std;
int len;
struct Dot {
int x;
int y;
char c;
}a[10000000];
int vis[10000000];
char c[5] = {35, 36, 37, 38, 79};
string s = "/\\";
int n;
string word1 = "Merry Christmas ^_^ !";
string word2 = "From H.N. Magnolia_tree";
void getcur(short int x,short int y)//移动光标函数
{
COORD pos = (COORD){x,y};//定义一个屏幕上的座标
HANDLE handle = GetStdHandle( STD_OUTPUT_HANDLE );
SetConsoleCursorPosition( handle,pos );;
}
void goprint(int x,int y, char c) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), rand()%16);
getcur(x,y); printf("%c", c); //getcur(0,row);//消除