• 6404阅读
  • 2回复

权限问题 [复制链接]

上一主题 下一主题
离线dltanglin
 

只看楼主 倒序阅读 楼主  发表于: 2010-08-04
关键词: permissiondenied
#include<iostream>
#include <QWidget>
#include<QPainter>
#include<QImage>
#include<QApplication>
#include <QPlastiqueStyle>

using namespace std;

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QApplication::setStyle(new QPlastiqueStyle);
QImage tmpImg("boy.jpg", "Format_RGB32");
int widgetWidth;
int widgetHeight;
widgetWidth = tmpImg.width();                       //Returns the width of the image
widgetHeight = tmpImg.height();
cout<<widgetWidth<<widgetHeight<<endl;
return a.exec();
}
其实我的意思很简单,就是读进一幅图像,显示它的大小,为什么在编译之后会出现权限受限的问题?
cannot open output file debug\untitled.exe:Permission denied
离线dbzhang800

只看该作者 1楼 发表于: 2010-08-04
引用楼主dltanglin于2010-08-04 20:01发表的 权限问题 :
#include<iostream>
#include <QWidget>
#include<QPainter>
#include<QImage>
#include<QApplication>
.......
你能先关掉它(你的程序),再编译么
离线dltanglin

只看该作者 2楼 发表于: 2010-08-04
回 1楼(dbzhang800) 的帖子
弱弱的问一下,是什么程序啊?a.exe么?它根本没有被打开啊?>_<
快速回复
限100 字节
 
上一个 下一个