不知道是不是VS.NET 2003的bug
2007-04-09 19:48
381 查看
#include <windows.h>
__interface INew
//Microsoft Visual Studio .NET 2003开发文档中规定 interface Can only contain public, pure virtual methods.
{
void MsgHelloWorld();
//不知道什么原因,这理却可以写函数的实现代码。
{
MessageBox(NULL,"Hello World","Notice",MB_OK);
};
//如果这理没有实现代码,必须将以上声明改为如下的样子才能编译。
//virtual void MsgHelloWorld()=0;
//且在重载该接口时,再不能调用INew::MsgHelloWorld();
};
class NewClass:public INew
{
public:
void MsgHelloWorld()
{
INew::MsgHelloWorld();
}
};
int main()
{
INew * nc = new NewClass() ;
nc->MsgHelloWorld();
delete nc ;
return 0;
}
__interface INew
//Microsoft Visual Studio .NET 2003开发文档中规定 interface Can only contain public, pure virtual methods.
{
void MsgHelloWorld();
//不知道什么原因,这理却可以写函数的实现代码。
{
MessageBox(NULL,"Hello World","Notice",MB_OK);
};
//如果这理没有实现代码,必须将以上声明改为如下的样子才能编译。
//virtual void MsgHelloWorld()=0;
//且在重载该接口时,再不能调用INew::MsgHelloWorld();
};
class NewClass:public INew
{
public:
void MsgHelloWorld()
{
INew::MsgHelloWorld();
}
};
int main()
{
INew * nc = new NewClass() ;
nc->MsgHelloWorld();
delete nc ;
return 0;
}
相关文章推荐
- 发现vs.net 2003的一个小bug~
- 不知道是不是VS的bug还是MSI的bug!!VS2003.net打包安装程序的怪现象
- VS.NET2003多项目解决方案的一个BUG
- 发现vs.net 2003的一个小bug~
- customize the template of new files in vs.net 2003
- 很喜欢VS.NET 2003对条件编译的代码提示
- Develop Smartphone Device use VS.NET 2003
- VS.NET 2003 控件命名规范
- vs.net 2003/2005调试javascript的一个小技巧
- VS.net 2003快捷键一览表
- windows2003 + vs.net 2003 安装boost库
- 在vs.net 2003中编译ns2(1):编译tcl
- VS 2003 的一个Bug?
- 在vs.net 2003中编译ns2(4):编译tclcl
- vs.net 2003 错误:无法生成项目输出组“内容文件来自stuschool(活动)”
- vs.net 2003 中 连接directx 项目
- Asp.net_解决vs运行报在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题的bug方法
- vs.net 2003 的安装配置
- vs.net 2003 和2005中邮件发送比较
- VS.NET 2003 bookmark的快捷键