请问这个源代码哪里错了!大神们帮我指点一下错误❌❌❌❌❌
#include “cminemap.h”
#include “ui_cminemap.h”
#include <qpainter.h>
#include <qpixmap.h>
#include
CMineMap::CMineMap(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::CMineMap)
{
ui->setupUi(this);
}
CMineMap::~CMineMap()
{
delete ui;
}
bool CMineMap::Onlbtup(int m, int n)
{
if (Map[m][n] >= 101 && Map[m][n] <= 108)
{
Map[m][n] -= 100;
first = 0;
iswin();
return true;
}
if (Map[m][n] == 100)
{
Map[m][n] -= 100;
Onlbtup(m - 1, n);
Onlbtup(m + 1, n);
Onlbtup(m, n - 1);
Onlbtup(m, n + 1);
Onlbtup(m - 1, n - 1);
Onlbtup(m + 1, n - 1);
Onlbtup(m - 1, n + 1);
Onlbtup(m + 1, n + 1);
}
if (Map[m][n] == 99)
{
for (int i = 0; i < mx; i++)
for (int j = 0; j < my; j++)
{
if (Map[i][j] == 99)
Map[i][j] = -1;
if (Map[i][j]>49 && Map[i][j] < 60)
Map[i][j] = -2;
}
}
return true;
}
void MainWindowpaintEvent(QPaintEvent *)
{
QPixmap bmpmap(":new/prefix1/res/item2.bmp");
QPixmap bmpnub(":new/prefix1/res/item1.bmp");
QPixmap bmpfame(":new/prefix1/res/item3.bmp");
QPixmap bmpface(":new/prefix1/res/item4.bmp");
QPainter painter(this);
for(int i=0;i<mineMap.mx;i++)
{
for(int j=0;j<mineMap.my;j++)
{
if (mineMap.Map[i][j] >= 0 && mineMap.Map[i][j] < 9)
{
painter.drawPixmap( i * 20+offsetx, j * 20 + 40+offsety, bmpmap, mineMap.Map[i][j] * 20, 0,20,20);
}
if (mineMap.Map[i][j]>90)
painter.drawPixmap(i * 20+offsetx, j * 20 + 40+offsety,bmpmap, 10 * 20, 0,20,20);
if (mineMap.Map[i][j] == -1)
painter.drawPixmap(i * 20+offsetx, j * 20 + 40+offsety,bmpmap, 9 * 20, 0,20,20);
if (mineMap.Map[i][j] == -2)
painter.drawPixmap(i * 20+offsetx, j * 20 + 40+offsety, bmpmap, 12 * 20, 0,20,20);
if (mineMap.Map[i][j] > 40 && mineMap.Map[i][j] < 60)
painter.drawPixmap(i * 20+offsetx, j * 20 + 40+offsety, bmpmap, 11 * 20, 0,20,20);
}
}
void drawPixmap(int x, int y, const QPixmap & pixmap, int sx, int sy, int sw, int sh);
}