自己写软件结果句柄无效了……
这个小程序不要转载!!!
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <conio.h>
#include <windows.h>
#include <stdio.h>
using namespace std;
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
int xrand(int x, int n)
{
return x + 1 + n;
}
void pos(int x,int y)
{
COORD posPoint = {
x,y};
SetConsoleCursorPosition(hOut,posPoint);
}
void my_color()
{
WORD orange = FOREGROUND_RED|FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_INTENSITY|BACKGROUND_GREEN;
SetConsoleTextAttribute(hOut,orange);
}
void cyan_choose()
{
WORD cyan =FOREGROUND_GREEN|FOREGROUND_INTENSITY|BACKGROUND_GREEN|BACKGROUND_BLUE;
SetConsoleTextAttribute(hOut,cyan