C++.net窗体应用程序怎么定义数组啊

[复制链接]
查看11 | 回复2 | 2008-12-3 14:50:29 | 显示全部楼层 |阅读模式
public ref class MyChess : public System::Windows::Forms::Form
{

private:

intBoard[10][9];// 出现错误
}
错误信息如下:
Error
1
error C4368: cannot define 'Board' as a member of managed 'Chess::MyChess':

mixed types are not supported
d:\chess.h

回复

使用道具 举报

千问 | 2008-12-3 14:50:29 | 显示全部楼层
不能在一个托管的类中混合定义一个非托管类型在ref类中不能用数组,使用指针吧。...
回复

使用道具 举报

千问 | 2008-12-3 14:50:29 | 显示全部楼层
int [] dd=new int[4]...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行