我是閱讀使用C++作爲數據的bmp文件的新手,我正在使用EasyBMP庫來做到這一點。我正面臨一些錯誤。使用EasyBMP讀取bmp文件時出現錯誤
這裏是cpp的代碼:
# include <iostream>
# include <string>
# include <cmath>
# include <algorithm>
# include <vector>
# include "EasyBMP.h"
using namespace std;
int main(){
freopen ("input.txt", "r", stdin);
freopen ("output.txt", "w", stdout);
BMP NewImage;
NewImage.SetSize (640, 480);
NewImage.SetBitDepth(32);
BMP AnotherImage;
AnotherImage.ReadFromFile("logo.bmp");
cout<<"File info:"<<'\n';
cout<<AnotherImage.TellWidth()<<"X"<<AnotherImage.TellHeight()<<
" at "<<AnotherImage.TellBitDepth()<<" BPP"<<'\n';
return 0;
}
這裏是錯誤:
http://s020.radikal.ru/i709/1410/63/987bc0310ce4.png
(SRY沒有足夠的信譽來這裏上傳照片)
不能你告訴我是什麼我可以擦除這個錯誤嗎? 在此先感謝!
您沒有鏈接庫。 – user657267 2014-10-12 05:23:17
具體嗎?我還應該做什麼? – TheStranger512 2014-10-12 05:31:48
user657267感謝您的評論!問題解決了! – TheStranger512 2014-10-12 09:23:28