Zero101713 2023-04-03 19:33 采纳率: 25%
浏览 25

装了esayx库的DEVc++在导入图片时候,运行程序黑屏

装了esayx库的DEVc++在导入图片时候,运行程序黑屏,怎么解决?

img

#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>

IMAGE img[12];    
int imgIndex[12] ={0,2,4,8,16,32,64,128,256,512,1024,2048};
    
int main()
{    
      initgraph(600,800);
      IMAGE background;
      loadimage(&background,"D:\红色故事程序\0.bmp.psd",600,800);
      putimage(0,0,&background);
      getchar();
 

    closegraph();
    system("pause");
    return 0;
 }


  • 写回答

2条回答 默认 最新

  • threenewbee 2023-04-03 21:04
    关注
    loadimage(&background,"D:\红色故事程序\0.bmp.psd",600,800);
    ->
    loadimage(&background,"D:\\红色故事程序\\0.bmp.psd",600,800);
    
    

    另外,看看文件是否存在

    评论

报告相同问题?

问题事件

  • 创建了问题 4月3日