C++ 类中的静态变量
静态数据成员:
下面看一个例子:
#include
class Point
{
public:
void output()
{
}
static void init()
{
}
};
void main( void )
{
Point pt;
pt.init();
pt.output();
}
这样编译是不会有任何错...
分类:
编程语言 时间:
2014-07-08 21:11:37
阅读次数:
179
1、main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"...
分类:
移动开发 时间:
2014-07-08 20:00:21
阅读次数:
277
输出如下矩阵:
0000
0111
0122
0123
public static void main(String[] args){
for(int i=0;i<4;i++){
for(int j=0;j=j?j:i);
}
System.out.println();
}
}...
分类:
编程语言 时间:
2014-07-08 19:15:05
阅读次数:
733
??
public static void main(String[] args)
{
//
getFile();
/*
* 需求: 对指定目录进行所有内容的列出,(包含子目录中的内容)
*
*/
File dir = new File("E:\\HB_JAVA解压");
listAll(dir, 0);...
分类:
编程语言 时间:
2014-07-08 18:20:03
阅读次数:
175
这篇文章的游戏使用SpriteKit和Swift语言来完成。
SpriteKit是苹果自己的游戏引擎,更能贴合iOS系统底层的API,不过架构和实现上都是模仿了Cocos2D。所以使用上其实差别不大,不过SpriteKit更轻量级一些。
程序入口
main函数跟OC一样,将入口指向了appdelegate,而cocoa touch框架几乎跟OC一样,只不过用Swift重写了一...
分类:
其他好文 时间:
2014-07-08 17:05:59
阅读次数:
270
??
/*
* 装饰设计模式:
*
对一组对象的功能进行增强时,就可以使用该模式进行问题的解决;
* 装饰和继承都能实现一样的特点: 就是进行功能的扩转增强。
*
*/
public class TestIO4
{
public static void main(String[] args)
{
Person...
分类:
编程语言 时间:
2014-07-08 16:45:11
阅读次数:
165
第一种方法:cout
#include
#include
using namespace std;
int main()
{
double aDouble = 5.141592694827862736487362746374637434343434;
cout<<fixed<<setprecision(20)<<aDouble<<endl;
return 0;
}
第二种方...
分类:
编程语言 时间:
2014-07-08 15:56:26
阅读次数:
208
#include
using namespace std;
int main()
{
// 第一种,使指针不能修改对象的值,注:此时指针可以指向另外的对象
int i = 10;
int j = 100;
const int *pi = &i; // 限定指针无法修改对象的值
//*pi = 1000; // error!
pi = &j;
cout<<*pi<<e...
分类:
其他好文 时间:
2014-07-08 15:45:26
阅读次数:
180
GetWindowRect(Main, re1);
main_DC := GetWindowDC(Main);
rg1 := CreateEllipticRgnIndirect( re1 );
//CreateRectRgnIndirect( re1 );
//CreateRoundRectRgn( re1.Left , re1.Top - 100, re1.Right - 50, re1...
分类:
其他好文 时间:
2014-07-08 12:51:31
阅读次数:
168