在VC++开发环境下实现通用栈  

Achievement of General Stack in Visuall C++

在线阅读下载全文

作  者:蔺建霞[1] 

机构地区:[1]山西省财政税务专科学校,太原030024

出  处:《电脑开发与应用》2013年第11期66-69,共4页Computer Development & Applications

摘  要:栈作为一种后进先出结构,在程序设计中广泛使用。类模板是C++所提供的一种占有重要地位的特殊机制,能根据不同参数建立不同类型对象的类。通过类模板建立通用栈类,栈中便可以存放任意类型的数据,提高编程效率,增强软件通用性和灵活性。简要介绍了栈的概念和C++的模板类的定义和使用,并利用模板类实现了通用的栈结构,还给出了在Visual C++环境使用的实例。As a LIFO structure ,stack is widely used in program design. Template class, a kind of important special mechanism provided by C ++, can create objects of different types according to the different parameters of the class.After created into general stack by template class ,the stack can store any type of data, improve the efficiency of programming, enhance the software flexibility and generality.This paper introduces the concept of stack and how to use the template class of C++ simply, achieves a general stack by using template class, and gives a instance using template class in visual C++.

关 键 词: 模板类 C++ 通用栈 

分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象