今天看到一段代码,其中有一个是声明结构体的,其中 有一句没有看懂是什么意思的,烦请前辈指点下!
struct tagTest
{
int a;
int b;
char c; static tagTest* instance(); //这个,是什么意思哦???
};
就知其中的 static tagTest* instance(); 这句!是什么意思呢?有什么用呢?谢谢!
struct tagTest
{
int a;
int b;
char c; static tagTest* instance(); //这个,是什么意思哦???
};
就知其中的 static tagTest* instance(); 这句!是什么意思呢?有什么用呢?谢谢!
解决方案 »
- 问个vc中Unicode 转ascii的问题
- VC怎样删除components and controls中添加的东西???50分,请高手帮忙!
- 在debug状态下,设置断点不好用
- 我严重抗议csdn每天发一篇yy帖,这有意思吗?
- 请教高手一个多线程的问题
- 实时视频(mpeg4格式)通过网络数据传输保存后的.mpg文件的帧率在70以上?
- 我想学C++不知道什么书比较好,我已学过C语言,
- Windows消息大全
- 怎样把按钮控件变为平面?
- 谁能给我一个用DAO操作数据库的例子,因为我的MDB数据库事先不知道路径和文件名,所以不能用那种派生类来操作.
- 送分100分:在VC6中显示调用动态链接库中函数的问题。
- 关于directsound
tagTest* tagTest::instance()
{
static tagTest test;
return &test;
}
用法:
tagTest* p=tagTest::instance();