OMG!
有人能告诉我为什么出问题吗?
代码如下:
#ifndef YRGAME
#define YRGAME
#include<iostream>
#include<cmath>
#include<iomanip>
#include<string>
#include<time.h>
#include<cctype>
#include <stdlib.h>
#include <cstdio>
#include <conio.h>
#include <cstdlib>
#include <fstream>
#include <windows.h>
#include <algorithm>
using namespace std;
void YROUT(string xinxi)
{
for (int item=0;item<xinxi.size();item++)
{
cout<<xinxi[item];
Sleep(70);
}
}
void colorF0()
{
system("color F0");
}
void color(int c)//颜色
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), c);
return;
}
void hidecursor()//隐藏光标
{
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = sizeof(cursor);
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorInfo(handle, &cursor);
return;
}
void title(string net)//
{
string t = "title ";
t += net;
system(&t[0]);
return;
}
void YRGAMEBANBEN()//查看当前YRGAME库版本信息
{
cout<<endl<<"库名:YRGAME"<<endl;
cout<<"类型:拓展库"<<endl;
cout<<"版本号:YR5774 TRTR032098@qq.com"<<endl;
return;
}
void cls(){system("cls");}
void retr(){//退出程序
HWND hWnd=GetForegroundWindow();
ShowWindow(hWnd,SW_HIDE);
exit(0);
}
void click_left(){//鼠标左键点击
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(5);//要留给某些应用的反应时间
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}
void click_right(){//鼠标右键点击
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
Sleep(5);
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
}
#endif
编译3秒后,弹出一个"源代码未编译"的窗口!
图片如下:
哦,对了,代码的源网站如下:
https://blog.csdn.net/m0_64036070/article/details/122798822?utm_source=app&app_version=5.0.0
还有,我用的软件与作者用的一模一样!
请大家解答一下,谢谢!