0
价值
1
回答
浏览

Win11 visual studio 2022 背景图片出不来
#define _CRT_SECURE_NO_WARNINGS
#include <graphics.h>
#include <conio.h>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include<stdlib.h>
#include <easyx.h>
#include<Wi
0
价值
1
回答
浏览
我在做一个黑白棋的小游戏,这是判断胜负的函数,不知道为什么运行的时候可以运行到“drawtext那一行”,但是界面里并没有显示文字,求助。
void whowin() {
nb = 0; nw = 0;
for (int i = 1; i < 9; i++) {
for (int j = 1; j < 9; j++) {
if (board[i][j] == 1)nw++;
if (board[i][j] == 2)nb++;
}
}
if ((win
0
价值
1
回答
浏览
调试后先提示发生生成错误,是否运行上次的成功生成
选择确定后,,提示:无法启动程序:后面是文件位置。最后是 系统找不到指定的文件。
#include <graphics.h>
int main(void)
{
initgraph(640, 480);
circle(320, 240, 200);
closegraph();
return 0;
}
0
价值
1
回答
浏览
操作系统 windows10 编译环境 visual studio 2022 EASYX版本 2023大暑版
在清屏之后,程序有时候会突然崩溃,有的时候就可以正常运行。
返回值是 -1073741819,调试调用堆栈发现是ntdll.RtlpWaitOnCriticalSection()函数出了问题,但是没有指明具体哪一个变量有问题
#include <graphics.h>
#include <conio.h>
#include <iostr
0
价值
1
回答
浏览
---旧编译环境
win10+vs2017+easyx2018
---现编译环境
win10+vs2022+easyx2023 release/debug x86
---错误提示如下
0x00951A45 处有未经处理的异常(在 MineSweeper.exe 中): 0xC0000005: 读取位置 0x00000378 时发生访问冲突。
---调用堆栈信息
> MineSweeper.exe!Ge
0
价值
1
回答
浏览
我希望程式能在關閉前,先執行我要完成的內容
我嘗試用GetMessage获取關閉消息 ,但是無法成功获取
MSG msg;
while (1) {
GetMessage(&msg, hwnd, 0, 0);
if (msg.message == WM_CLOS
0
价值
1
回答
浏览
我是刚刚接触c语言的人,复制了一段代码·,想玩一下贪吃蛇但是,显示找不到这个文件D:\CodeBlocks\project\1-3\1-3\main.c|4|fatal error: graphics.h: No such file or directory|
,用的是codeblocks这个软件,求求解答,拯救一个新手吧
#include <easyx.h>
#include <stdio.h>
#include <conio.h>
#include <
0
价值
2
回答
浏览

题目地址:https://oj.neauacm.cn/problem.php?id=1180
题目描述
黑大帅和潇洒哥在玩游戏,他们找到n行石子,每行有m颗石子,现在游戏规则是这样的,每个人轮流拿,每次只能拿一行中的一个或连续两个,最后谁拿不了谁输,为了展现绅士风范,潇洒哥让黑大帅先拿。
输入
输入包含多组数据。
输入的第一行为一个整数t(1<=t<=1000),代表测试用例的组数。
接下来的t组测试用例按
0
价值
1
回答
浏览
这是Easyx源代码,具体如图
#ifndef __cplusplus
#error EasyX is only for C++(这里报错)
#endif
0
价值
2
回答
浏览
#include <stdio.h>
#include <easyx.h>
int main()
{
initgraph(1200, 800);
outtextxy(400, 200, "xxxxxxx")
while(1);
return 0;
}
然后
严重性 代码 说明 项目 文件 行 禁止显示状态
错误(活动) E0304 没有与参数列表
0
价值
2
回答
浏览
根据 TAOCP 的算法流程图写的。
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdbool.h>
//
void swap(int* a, int* b) {
int temp = *a;
*a = *b;
*b = temp;
}
//
void pointer_swap(int** a, in
0
价值
1
回答
浏览
这个代码不因该是将“张三”按照汉字对应编码转化成整数然后再输出来吗
为什么每次执行完输出结果不一样
如果想实现将汉字组成的字符串转化为整数的话,只能这么写吗?(注释内)(用循环不算)
纯小白
#include<stdio.h>
#include<stdlib.h>
int main() {
char name[64]="张三";
printf("%d\n",(int)(name));
return 0;
}
/*
#includ
0
价值
1
回答
浏览
我在EasyX库IMAGE类的基础上写了一个支持透明度相关操作的图片类,下面是实现将这个图片类输出到某绘图设备上的print()函数。其中,为什么pointer[n]和debug_ptr[n](声明在被注释的代码处)(n就是一个正整数)不一样,并且pointer[n]是0x00000000。望大佬解决。
void print() {
if (isshow) {
IMAGE buffer = image;
//DWORD* pointer = GetImageBuffer(&buffer);
//
0
价值
1
回答
浏览
这个怎么设置字体啊,官方文档好像没写(VS2019 EasyX_20220901)
void settextstyle(
int nHeight,
int nWidth,
LPCTSTR lpszFace,
int nEscapement,
int nOrientation,
int nWeight,
bool bItalic,
bool bUnderline,
bool bStrikeOut
);