- 博客(83)
- 资源 (4)
- 收藏
- 关注
原创 小镇游戏C佳佳
#include<iostream>#include<windows.h>#include<conio.h>#include<unistd.h>#include<cstdlib>#include<time.h>#include<cmath> #include<fstream>#include<bits/stdc++.h>#include<cstdio>#include.
2022-06-29 11:37:04
2473
2
原创 C++输出爱心
💗#include<stdio.h>#include<Windows.h>int main() { float x, y, a; for (y = 1.5; y > -1.5; y -= 0.1) { for (x = -1.5; x < 1.5; x += 0.05) { a = x * x + y * y - 1; putchar(a * a * a - x * x * y * y * y <= 0.0 ? '*' : ' '
2022-05-29 17:36:38
1328
原创 C++一步解决cls闪烁问题
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);//定义显示器句柄变量,并且这个只能在每个头文件中单独定义句柄和函数,否则无效 void gotoxy(HANDLE hOut, int x, int y)//其中x,y是与正常理解相反的,注意区分 { COORD pos; pos.X = x; //横坐标 pos.Y = y; //纵坐标 ...
2022-04-18 21:43:35
1755
原创 运行错误哪位大什帮我一下C++
GetCurrentConsoleFont(hOutput, FALSE, &consoleCurrentFont);
2022-04-09 20:15:03
720
原创 抄写的C++常用函数
void ycgb()//隐藏光标 { CONSOLE_CURSOR_INFO cursor; cursor.bVisible = FALSE; cursor.dwSize = sizeof(cursor); HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorInfo(handle, &cursor); return; } void ydgb(long long h, long long .
2022-04-08 18:16:47
719
原创 设置字体及大小C++
void SetFont(int size = 30) {//hello imX2G CONSOLE_FONT_INFOEX cfi; //hello imX2G cfi.cbSize = sizeof cfi; //hello imX2G cfi.nFont = 0; //hello imX2G cfi.dwFontSize.X = 0; //hello imX2G cfi.dwFontSize.Y = size; //设置字体大小 cfi.FontFamily = FF_DONTCARE.
2022-03-19 21:32:50
5293
原创 最大化计算机窗口C++
void full_screen(){ HWND hwnd = GetForegroundWindow(); int cx = GetSystemMetrics(SM_CXSCREEN); /* 屏幕宽度 像素 */ int cy = GetSystemMetrics(SM_CYSCREEN); /* 屏幕高度 像素 */ LONG l_WinStyle = GetWindowLong(hwnd,GWL_STYLE); .
2022-03-14 20:15:24
290
原创 有趣C++生存游戏
#include #include using namespace std; int choice; int a=0,b=0,c=0,d=0; int user_input; void S(int Color) { HANDLE hCon=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hCon,Color); } void wait() { Sleep(100); user_input=getchar(); } void cls() ...
2022-03-13 23:22:35
833
5
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人