Code:
#pragma once
#pragma comment(lib, "gdiplus.lib")
#pragma comment(lib, "WINMM.lib")
//--------------------------------------------
#include <windows.h>
#include <gdiplus.h>
#include <iostream>
#include <tchar.h>
#include "Map.h"
#include "resource.h"
using namespace std;
using namespace Gdiplus;
Code:
main.cpp(14) : error C2143: syntax error : missing ';' before 'using'
còn đây là lỗi hàm khởi tạo
Code:
#include "Map.h"
Map::Map()
{
}
Code:
map.cpp(4) : error C2533: 'Map::{ctor}' : constructors not allowed a return type
rõ ràng là em có cho khởi tạo trả về gì đâu
dưới là khai báo class map ở map.h
Code:
struct Dinh
{
int x,y;
Dinh()
{
x = y = 0;
};
Dinh(int a, int b)
{
x = a ; y = b ;
};
};
class Map
{
private :
int n ;
Dinh mang_dinh[40];
bool mang_canh[40][40];
int batdau, dich;
public :
Map();
bool save_map();
bool load_map();
bool new_dinh(int x , int y);
bool delete_dinh(int i);
int get_dinh(int x , int y);
bool new_canh(int i , int j);
bool delete_canh(int i , int j);
int lenght(int i, int j);
bool get_batdau(int i);
bool get_dich(int i);
void paint(HDC hdc);
void search(HDC hdc);
}
help me !
