• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
demps_c
博客园    首页    新随笔    联系   管理    订阅  订阅
2013年10月9日
vector 数组
摘要: void f3(){ 40 vector go[10]; 41 for(int i=0;i < 10;i ++){ 42 for(int j = 1;j < 100;j ++){ 43 go[i].push_back(j); 44 } 45 } 46 for(int i=0;i < 10;i ++){ 47 for(int j = 0;j < 99;j ++){ 48 cout << go[i][j]<<endl; 49 } 50 } 51 } 阅读全文
posted @ 2013-10-09 22:06 demps_c 阅读(150) 评论(0) 推荐(0)
模板元编程
摘要: #include 2 using namespace std; 3 templatestruct factoria{ 4 enum{ val = factoria::val * n};//注意n后面没有;只有union abc{int a;double b;}; 5 }; 6 templatestruct factoria{ 7 enum{val = 1}; 8 }; 9 void f1(){ 10 for(int i =1;i ::val struct fab{ 18 enum{ val = fab::val + fab::val}; 19 ... 阅读全文
posted @ 2013-10-09 14:21 demps_c 阅读(223) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3