Chinaunix首页 | 论坛 | 博客
  • 博客访问: 594861
  • 博文数量: 239
  • 博客积分: 7941
  • 博客等级: 准将
  • 技术积分: 2467
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-10 12:14
个人简介

及时当勉励

文章分类

全部博文(239)

文章存档

2013年(29)

2011年(22)

2010年(188)

分类:

2011-01-17 10:10:56

// ===============================================
//
//       Filename:  Exam.cpp
//
//    Description:  
//
//        Version:  1.0
//        Created:  2011年01月16日 20时57分14秒
//       Revision:  none
//       Compiler:  g++
//
//         Author:  贾献华 (GNU_hua), jiaxianhua@gmail.com
//        Company:  hisoft
//
// ===============================================

#include
using namespace std;


template
struct C {
    enum { value = n * C::value };
    static const int s_value = n * C::s_value;
};


template<>
struct C<1> {
    enum { value = 1 };
    static const int s_value = 1;
};



int main (int argc, char* argv[]){
    cout << C<7>::value << endl;
    cout << C<7>::s_value << endl;
    return 0;
}

// ----------  end of function main  ----------

阅读(2162) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~