打印菱形,C++模板元版
2009-06-09 08:13
225 查看
代码:
template<int x>
struct Abs
#pragma pack(push , 1 )
template<int num ,int x ,int y>//x行数这是多少行,y递归用第几个元素
struct line
template<int num , int x>
struct line<num,x,0>
template<int num, int x , int y>//x行数,不变,y递归用
struct Row
template<int num , int x>
struct Row<num,x , 0>
template<int x>
struct test
#pragma pack(pop )
int main(int argc, char* argv[])
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/akirya/archive/2007/01/18/1486438.aspx
template<int x>
struct Abs
#pragma pack(push , 1 )
template<int num ,int x ,int y>//x行数这是多少行,y递归用第几个元素
struct line
template<int num , int x>
struct line<num,x,0>
template<int num, int x , int y>//x行数,不变,y递归用
struct Row
template<int num , int x>
struct Row<num,x , 0>
template<int x>
struct test
#pragma pack(pop )
int main(int argc, char* argv[])
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/akirya/archive/2007/01/18/1486438.aspx
相关文章推荐
- c++命令提示符窗口下打印指定大小的菱形代码
- c++命令提示符窗体下打印指定大小的菱形代码
- 利用C++递归打印菱形
- C++打印菱形
- C语言实验——打印菱形 (sdut oj)
- 1135C/C++经典程序训练5---图形打印问题
- nyoj 还是打印菱形
- 打印菱形图案printDiamond
- Java基础知识强化07:打印出空心菱形
- 打印菱形和半菱形
- 剑指offer--python --c++--从尾到头打印链表
- C++ 给出一个链表的头结点,倒序打印链表
- 用c语言在屏幕上打印出一个菱形
- 1174 C语言实验——打印菱形
- Java中打印掏空的菱形
- C++输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,
- 【C++】继承和多态之——菱形继承
- c语言打印菱形
- C/C++经典程序训练5---图形打印问题
- android native c++打印log输出