检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:蔺建霞[1]
出 处:《电脑开发与应用》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++.
分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.49