05 2013 档案

摘要:首先看一个例子: 1 #include <iostream> 2 using namespace std; 3 4 class A{}; 5 6 class B 7 { 8 int b; 9 char c;10 };11 12 class C13 {14 int c1; 15 static int c2;16 };17 int C::c2 = 1;18 19 class D:public C,public B{20 int d;21 }; 22 int main()23 {24 cout<<"sizeof(A)="<<sizeof(A). 阅读全文
posted @ 2013-05-03 21:39 yitianke 阅读(469) 评论(0) 推荐(2) 编辑
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 6 int main() 7 { 8 int v[2][2]={{1,2},{3,4}}; 9 cout<<"v = "<<v<<endl;10 cout<<"*v = "<<*v<<" &v = "<<&v<<endl;11 cout<<"*v+1 = "<<*v+1 阅读全文
posted @ 2013-05-02 21:12 yitianke 阅读(712) 评论(0) 推荐(0) 编辑