首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 62 毫秒
1.
C++语言是C语言的超集,C++语言除了在C语言的基础上扩充了面向对象特征外,还扩充了非面向对象特征,本文讨论了C++语言不同于C语言的非面向对象特征、C++面向对象程序设计中的二义性和C++语言的文件操作,并给出了一些应用例子。  相似文献   

2.
C++语言是目前应用最广泛的程序设计语言,它所提供的各种特点有助于写出简单明了、有效且易于维护的程序。但C++语言的编译环境有一些不完善的地方,常常出现一些意想不到的错误,给编程者带来很大不便。本文谈谈笔者在C+十下编程时经常遇到的关于整数乘、除法运算和数组越界方面遇到的错误及解决办法。一、C+十语言不能自动进行长整数转换笔者在用C+十编程时,用整数作乘、除法运算时,运算结果经常出现一些随机数,和实际运算结果相差很远,后来发现:两个整数相乘时,若乘积为长整数,编译程序不能自动转换为长整数,需在乘积…  相似文献   

3.
C/C++教学改革的探索研究   总被引:1,自引:0,他引:1  
王世东 《福建电脑》2011,27(2):48-49
针对现在大学生状况和心理特点,本文提出软件剖析的C/C++教学方法,并就实验教学以及教材的选定等方面提出了一些新思路和理念。实践证明,C/C++教学改革的这些探索研究能够促进学生的学习兴趣和求知欲,提高教学效果。  相似文献   

4.
多态性是面向对象程序设计的重要支柱之一。函数重载机制在C++中用来支持多态性。本文对对C++中函数重载机制实现中的主要问题提出了重载函数链表、函数类型匹配和系统换名等技术,完成C++编译系统中函重载的实现。  相似文献   

5.
介绍了C++标准为了适应泛型编程的大规模运用,在语言核心方面对泛型编程能力将要作出的改进,概述了C++模板类型系统Concepts的主要功能和语言要素以及标准库支持,并给出一些例子进行说明。最后,简单介绍了现有的Concepts实现。  相似文献   

6.
董士珍 《福建电脑》2010,26(2):55-55,76
多态是C++语言中最重要的特性之一,而虚表以及虚函数是实现多态的重要手段。许多C++语言的教材对于虚函数的使用以及调用机制有着详细的阐述,但是对于虚表的一些细节内容阐述却并不是很深,对于虚表我们可能会有很多疑问。本文就试图通过使用汇编语言对于虚表实现的细节进行分析,从而加深对多态机制的理解。  相似文献   

7.
郑赟 《福建电脑》2010,26(10):173-174
游戏是现在非常流行的行业之一,涉及非常广泛包括设计,开发,推广,管理等等。编程工具在游戏的开发阶段起到了决定性作用。本文将通过引入游戏产业,指出Visual C基础构架的一些资料,讨论Visual C++(MFC)和Visual C++(.NET)这两种游戏编程方法。  相似文献   

8.
完善C++的虚机制以增强其多态性   总被引:1,自引:0,他引:1  
在如C++等强类型面向对象语言中,因仅能通过继承结合虚函数来表达某些动态多态性,从而难以自然有效地描述给某一族类中的各个类都添加一些共同特性。文中提出了的真正虚基类和虚数据成员概念及相应的语言机制可用来方便地解决上述问题,同时又可消除C++中虚函数与虚基类概念上的不一致,改进和完善强类型面向对象语言中的虚机制,增强其多态性方面的表达能力,并且在多数情况下可以安全、有效地代替受限类属机制和多继承,从  相似文献   

9.
随着多媒体技术的发展,教育行业也发生巨大的变化,使原本枯燥的知识变得生动易懂,针对Visual C++课程内容多,难度大的特点,作者利用多媒体开发平台开发vc++课程辅助教学系统,来帮助Visual C++爱好者的学习、提高。本文主要以此系统为例简要介绍了多媒体教学软件开发的总体过程,以及开发过程中的一些制作技巧、策略。  相似文献   

10.
在使用安全、方便的C++的I/O流操作中,某些细节的处理往往被忽视,这会给看似简单的程序带来料想不到的影响。文章结合作者多年C语言及C++语言的教学经验,针对I/O流在教学过程中遇到的问题,对缓冲式输入、输出操作进行了较为深入的研究,提出了若干使用技巧,希望能给C++教学和C++语言的运用提供一些有益的借鉴。  相似文献   

11.
阐述了C++语言与C语言的关系,以及C++编程技术的基础,对C++最为突出的程序设计功能类和对象进行分析,给出了C++语言编程的有关技巧.  相似文献   

12.
The authors evaluated six C++ environments: three for MS-DOS PCs, and three for mini and mainframe Unix systems. They tested the MS-DOS products-Advantage C++ Version 1.2 (beta2a), Guidelines C++ Version 1.2, and Zortech C++ Version 1.05-on an 8-MHz, 80286-based PC with a 44-Mbyte hard disk but with no math coprocessor. They tested Oregon C++ Version 1.1C on a Sun-3 running SunOS 3.5; GNU C++ on a Sequent Balance 21000 running Dynix 3.0; and AT&T C++ on the Sequent, the Sun, and on a Digital Equipment Corp. MicroVAX II running Unix 4.3 BSD. They believe, based on the results of their study, that C++ will be the dominant object-oriented language that industry uses for serious software development  相似文献   

13.
一种用C++动态扩展C#程序的方法   总被引:1,自引:0,他引:1  
提出一种用非托管C++(以下简称C++)动态扩展C#程序的方法。利用托管C++作为适配器,由C++类继承C#基类,并且获取C#程序提供的服务;将C++类利用托管C++作为适配器,通过C#基类的派生类提供给C#程序动态加载。实例表明该方法能够使C++编写的类继承C#程序中的类,获取C#程序提供的服务;并且使C#程序能够动态创建并调用C++类对象。该方法能够为C++源代码的重用、C++源代码与.NET平台语言的混合编程等提供解决方案。  相似文献   

14.
本文介绍C++在嵌入式系统中的应用研究,并介绍C++编程语言以及嵌入式系统,分析怎样在嵌入式应用中编写优秀的C++代码,最后简明分析了C++在嵌入式领域的发展前景。  相似文献   

15.
N. H. Gehani  W. D. Roome 《Software》1988,18(12):1157-1177
C++ and Concurrent C are both upward-compatible supersets of C that provide data abstraction and parallel programming facilities, respectively. Although data abstraction facilities are important for writing concurrent programs, we did not provide data abstraction facilities in Concurrent C because we did not want to duplicate the C++ research effort. Instead, we decided that we would eventually integrate C++ and Concurrent C facilities to produce a language with both data abstraction and parallel programming facilities, namely, Concurrent C++. Data abstraction and parallel programming facilities are orthogonal. Despite this, the merger of Concurrent C and C++ raised several integration issues. In this paper, we will give introductions to C++ and Concurrent C, give two examples illustrating the advantages of using data abstraction facilities in concurrent programs, and discuss issues in integrating C++ and Concurrent C to produce Concurrent C++.  相似文献   

16.
Dale Parson  Zhenyu Zhu 《Software》2000,30(15):1641-1660
The JavaTM Native Interface (JNI) provides a set of mechanisms for implementing Java methods in C or C++. JNI is useful for reusing C and C++ code repositories within Java frameworks. JNI is also useful for real‐time systems, where compiled C/C++ code executes performance‐critical tasks, while Java code executes system control and feature tasks. Available JNI literature concentrates on creating Java proxy classes that allow Java clients to interact with C++ classes. Current JNI literature does not discuss Java proxies for entire C++ inheritance hierarchies; that is the topic of this paper. Our experience in reusing C++ class hierarchies within a Java framework has uncovered a set of useful techniques for constructing Java proxy class hierarchies that mirror their C++ counterparts. This report gives both high level design guidelines and specific programming idioms for constructing Java class hierarchies that serve as proxies for C++ counterparts. We begin by discussing opportunities for reuse within a proxy class hierarchy, as well as problems caused by differences between the Java and C++ approaches to inheritance. The two most significant differences are due to C++ support for invocation of a member function based on the static type of its class, and C++ support for multiple implementation inheritance. Two example C++ class hierarchies provide the basis for a set of sections that present the design guidelines and that codify the programming idioms. This work could serve as the basis for an automatic generator of Java proxy class hierarchies. Copyright © 2000 John Wiley & Sons, Ltd.  相似文献   

17.
C++语言是当前十分流行的、面向对象程序设计语言。通过对C++语言的深入研究以及较多的编程实践,总结归纳了C++语言的知识体系和编程中的几个常见问题,比如构造函数、对象指针、const数据和成员的访问属性等,对这些容易搞混淆的问题逐一进行详尽的分析和说明,并解释了其原因所在。通过阅读该文可为编程者带来有益的帮助,以便编程中碰到同类问题时能够解决。  相似文献   

18.
Concurrent C/C++ is a superset of C and C++ that provides parallel programming facilities based on message passing. Upon porting Concurrent C/C++to a shared memory multiprocessor, the authors believed it would be appropriate to supplement Concurrent C/C++ with explicit facilities for synchronizing accesses to shared data structures. The capsule, which is a shared memory access mechanism designed especially for Concurrent C/C++ to match the C++data abstraction facility called the class, is discussed. Capsules are like monitors but they have significant advantages. Capsules satisfy T. Bloom's (1979) criteria for expressiveness of synchronization conditions, support inheritance, allow operations to execute in parallel, and permit them to time out. The design of capsules is reviewed. The author evaluates existing shared memory mechanisms, describes capsules, gives examples of capsules, compares capsules with monitors, and discusses how capsules are implemented by the Concurrent C compiler  相似文献   

19.
Oracle C Class Library是支持Visual C 编译器的更为灵活、简便、可靠和高效的数据库连接方法。本文分析了0racle C Class Library的工作原理及使用过程,并给出了一个使用实例,说明了该数据访问技术在数据库编程中的具体实现方法。  相似文献   

20.
A. Biliris  S. Dar  N. H. Gehani 《Software》1993,23(12):1285-1303
C++ objects of types that have virtual functions or virtual base classes contain volatile (‘memory’) pointers. We call such pointers ‘hidden pointers’ because they were not specified by the user. If such C++ objects are made persistent, then these pointers become invalid across program invocations. We encountered this problem in our implementation of O++, which is a database language based on C++. O++ extends C++ with the ability to create and access persistent objects. In this paper, we describe the hidden pointers problem in detail and present several solutions to it. Our solutions are elegant in that they do not require modifying the C++ compiler or the semantics of C++. We also discuss another problem that arises because C++ allows base class pointers to point to derived class objects. C++ has emerged as the de facto standard language for software development, and database systems based on C++ have attracted much attention. We hope that the details and techniques presented will be useful to database researchers and to implementors of object-oriented database systems based on C++.  相似文献   

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

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