首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 62 毫秒
1.
蔡辉  孟飞 《微型电脑应用》2002,18(9):56-58,47
本文介绍了C 中的标准模板库(STL)的基本概念和应用容器,迭代器、算法进行STL程序设计的过程。并结合程序实例模块,详细阐述了STL容器中对象的创建过程。  相似文献   

2.
通用编程技术在C++程序中的应用   总被引:1,自引:0,他引:1  
本文综述了通用编程技术和STL的基本结构,并结合我们开发软件测试工具的工程实践,介绍了在VC++6.0环境下利用STL实现高效编程的方法。  相似文献   

3.
面向对象的程序设计方法与C++兰州铁道学院郑丽英面向对象的程序设计方法与传统的结构化程序设计方法有很大的不同。传统的结构化程序设计技术运用于开发软件系统时,采用基于功能的,自顶向下的功能分解法设计系统结构,从而提高了软件的易读性和可靠性,是一种典型的...  相似文献   

4.
李龙澍 《软件》1995,(3):45-50
本文讨论了C++与FoxPro混合程序设计技术,阐明了用C++语言修改Fox-Pro内存变量的技巧,论述了用C+直接读取数据库文件的方法,并且给出了关键程序。  相似文献   

5.
本文以C++为基础,详细论述了面向对象的程序设计技巧,提出了自顶向下设计,自底向上编码的设计方法,阐明了包容类的设计过程,给出了用C++语言编写的关键程序及应用实例。  相似文献   

6.
嵌入式实时程序设计中C/C++代码的优化   总被引:5,自引:0,他引:5  
本文简单介绍了嵌入式实时程序设计的特点和嵌入式系统中语言的选择,着重介绍了以下几种在嵌入式实时程序设计中优化C/C++代码的方法。  相似文献   

7.
C++语言程序设计是计算机专业的一门主干课程。本文根据教学实践,分析总结得出优秀的教学模式应该以程序设计为主线、以C++语言语法规则为辅,灵活地运用多种方法进行课堂教学;且注意加强实践技术技能的训练,重视面向对象思想的培养,在应用中提高学生分析问题、编程解决问题的能力。  相似文献   

8.
互动教学是教师教学方法和学生学习方法的融合与统一。在VC++程序设计教学中通过师生互动,可以激发学生对程序设计知识的兴趣,充分调动其学习的积极性、主动性和创造性,从而达到提高教学质量的目的。  相似文献   

9.
汪鹏 《程序员》2004,(7):35-38
泛型程序设计(Generic Programming)是建立在C++的Template机制基础上的一种完全不同于面向对象的程序设计思维模式,STL是泛型概念的一套实作产品。Loki是一十与Boost齐名的开放源码的C++程序库,它通过一些精巧的装置为常规C++开发提供了一些很有用的工具。STL非常好用,弹性非常大,效率也很理想。目前  相似文献   

10.
本文详细论述了面向对象程序设计技巧,提出了自顶向下设计,自底向上编码的面向对象设计方法,阐明了面向对象数据结构的设计过程,并且给出了用C^++语言编写的关键程序。  相似文献   

11.
STL是采用泛型编程思想设计的C 通用组件库。函数对象在STL中具有重要作用,它可以进一步提高算法的通用性,增强核心组件的功能。本文在简要介绍函数对象的基础上,讨论了它在STL中的应用。  相似文献   

12.
Generic programming has been defined as ‘programming with concepts’ where a concept refers to a family of abstractions. The criteria for generic programming include independence of collections from data types, independence of algorithms that operate on the collection, and the adaptability of the collections. This paper examines and evaluates the support for generic programming in the Java Development Kit (JDK) in comparison to C++'s Standard Template Library (STL). The evaluation will consider both the ‘qualitative’ factors as well as certain ‘quantitative’ factors (i.e. factors that can be measured). The qualitative factors that are considered include: 1. a comparison of the structure and APIs; 2. homogeneity versus heterogeneity; and 3. ease of use (including ease of converting to collection classes, ease of changing collection type, and ease of error handling). The quantitative factors include: 1. compiled size; 2. runtime memory usage; and 3. performance. The results of our evaluative comparisons based on the above factors and certain other criteria are presented at the end. Based on the results, we conclude that the support provided for generic programming in C++'s STL is superior to that provided by JDK. Copyright © 2003 John Wiley & Sons, Ltd.  相似文献   

13.
A key benefit of generic programming is its support for producing modules with clean separation. In particular, generic algorithms are written to work with a wide variety of types without requiring modifications to them. The Runtime concept idiom extends this support by allowing unmodified concrete types to behave in a runtime polymorphic manner. In this paper, we describe one implementation of the runtime concept idiom, in the domain of the C++ standard template library (STL). We complement the runtime concept idiom with an algorithm library that considers both type and concept information to maximize performance when selecting algorithm implementations. We present two implementations, one in ISO C++ and one using an experimental language extension. We use our implementations to describe and measure the performance of runtime-polymorphic analogs of several STL algorithms. The tests demonstrate the effects of different compile-time vs. run-time algorithm selection choices.  相似文献   

14.
钱陆 《软件》2013,(10):82-85
提出一种基于IOCP实现底层封装基础上的具有高性能的网络转发模块的设计方案。该方案基于Win32平台上并通过c语言开发实现。本文在传统线程池处理并发的基础上,采用多路并发,多线程技术,并通过了严格的压力和性能测试。本文同时提出关联容器映射的方法,保证了数据的准确转发。实验结果表明,该模块在保证准确转发交互的同时,能够支持海量并发连接,且具有较高的数据吞吐量,同时在实际项目应用中也取得了良好的表现。  相似文献   

15.
The Standard Template Library(STL)is a C library that provides a set of well structured generic C components that work together.Based on its well-structured design,STL can be extended by adding new generic algorithms or new generic containers.In this paper,the work on extending STY by adding several efficient container classes for threaded binary search trees is discussed.It is shown that the addition of threads significantly increases the efficiency of some important access operations on the binary tree containers.In general,significant gain in efficiency can be expected in situations where the data structures ar relatively stable,that is,the data structures are looked up often but modified little.  相似文献   

16.
王家华  康国庆 《现代计算机》2007,(12):99-101,117
针对油藏数据粗化的应用,研究了三维数据的数据结构,结合泛型编程与面向对象编程,并按照STL的容器、算法、速代器的模式设计了数据粗化程序库,在这个库中可以使用STL中算法和设施,具有重用性和扩展性.  相似文献   

17.
This paper presents a new metaprogramming library, CL_ARRAY, that offers multiplatform and generic multidimensional data containers for C++ specifically adapted for parallel programming. The CL_ARRAY containers are built around a new formalism for representing the multidimensional nature of data as well as the semantics of multidimensional pointers and contiguous data structures. We also present OCL_ARRAY_VIEW, a concept based on metaprogrammed enveloped objects that supports multidimensional transformations and multidimensional iterators designed to simplify and formalize the interfacing process between OpenCL APIs, standard template library (STL) algorithms and CL_ARRAY containers. Our results demonstrate improved performance and energy savings over the three most popular container libraries available to the developer community for use in the context of multi-linear algebraic applications.  相似文献   

18.
The C++ programming language has undergone significant changes since its inception in the 1980s, but has now reached a relatively steady state. Standard C++ now includes a general library of container classes, the Standard Template Library (STL). These developments are rapidly changing the styles used in C++ class programming. The paper has dual purposes: it provides an introduction to STL for C++ programmers, and it develops an efficient matrix class library, built upon STL, which provides functionality useful in areas such as computational economics, finance, mathematical programming and statistics. This library, which is freely available, comprises a full set of vector and matrix operations using both dense and sparse implementations. The paper discusses approaches towards and pitfalls in constructing C++ concrete data types, and has references for further on-line information.  相似文献   

19.
对C++教学中的泛型概念和使用进行了探讨,首先通过一个Stack类的例子引出泛型的概念,然后分析了泛型的优缺点并具体分析了模板函数和模板类的具体应用。最后对泛型的程序库STL进行了介绍。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号