A brief description of C++

C++的简要描述

 程序:如今计算机能够执行许多不同的任务,从简单的数学运算到复杂的动画模拟。但电脑本身并没有创造这些任务,这些执行以下一个符合我们所说的程序预定义的一系列指示。一台计算机没有足够的创造力,使它未被编程的任务,因此它只能按照它已被编程来运行程序的说明。在负责人的产生程序,使计算机可以执行新的任务被称为程序员或编码人员,他们为达到这样的目的而使用一种编程语言。

 

编程语言:

编程语言是一种说明和一个专门设计的以电脑做什么词汇集一系列公约。当选择一种编程语言,使一个项目有很多不同的考虑可以采取。首先,必须决定什么是作为编程语言水平闻名。编程语言的水平决定于与硬件的关联程度。在较低级别的语言,说明写思想直接与硬件接口,而在“高层次”的概念较为抽象或代码编写。

一般来说,高层次的代码更便携,这意味着它可以工作在不同的机器有更多的修改数量较少,而低层次的语言是由它被写为硬件peculiarides有限。不过,低级别的代码的优点是,它通常更快由于它确实是写利用特定机器的可能性优势的事实。

一个更高或更低的编程水平,是为特定的节目类型,这取决于正在开发的项目选择。例如,当一个硬件驱动程序的操作系统开发显然是一个非常低的水平,是用于编程。而当大的应用程序的开发通常是一个更高层次的选择,或在低层次的语言和其他书面较高的评论家部分的组合。 

      虽然有这显然被认为是低级像大会,其指令是适应每个代码供机组,和其他语言,语言本身是高的水平,如Java,即设计是完全独立的该平台将运行在哪里。C语言是在中间位置,因为它可以与几乎没有限制的硬件直接,也可以作为抽象的较低层,像最强大的高级别工作语言之一。

 

为什么使用C++?

C具有比其他编程语言的某些特性。最显着的是:

面向对象编程:定位的可能性编程对象允许程序员设计从更像是一个对象之间,而不是在一个结构化的代码序列沟通观点的应用。此外,它允许在一个更符合逻辑和生产方式的代码更大的可重用性。

可移植性:你可以编译几乎未作任何改变了几乎所有的计算机和操作系统类型相同的C++代码。C++是世界上最常用和移植的编程语言。

精简:在C++语言编写的代码是非常与其他语言的比较短,因为使用特殊字符是首选关键词,节省一些努力,程序员(并延长了我们的键盘的生命!)。

模块化编程:应用程序在C程序体可以由几个源代码是单独编译,然后连在一起的文件。节省时间,因为它没有必要重新编译整个应用程序时单一的变化,但只有文件包含它。此外,这一特点允许链接与其他语言生成的代码的C++代码,如汇编或C。

C兼容性:C++是向后兼容的C语言,用C语言编写的任何代码可以很容易地包含在C++程序而不做任何改变。

速度:从一个C++编译生成的代码是非常有效的,因为确实它的高层次和低层次的语言双重性和对语言本身的尺寸减小。

 

 

附:原文

A brief description

Programs

Nowadays computers are able to perform many different tasks, from simple mathematical operations to sophisticated animated simulations. But the computer does not create these tasks by itself, these are performed following a series of predefined instructions that conform what we call a program.

A computer does not have enough creativity to make tasks which it has not been programmed for, so it can only follow the instructions of programs which it has been programmed to run. Those in charge of generating programs so that the computers may perform new tasks are known as programmers or coders, who for that purpose use a programming language.

Programming languages

A programming language is a set of instructions and a series of lexical conventions specifically designed to order computers what to do.

When choosing a programming language to make a project, many different considerations can be taken. First, one must decide what is known as the level of the programming language. The level determines how near to the hardware the programming language is. In the lower level languages, instructions are written thinking directly on interfacing with hardware, while in "high level" ones a more abstract or conceptual code is written.

Generally, high level code is more portable, that means it can work in more different machines with a smaller number of modifications, whereas a low level language is limited by the peculiarides of the hardware which it was written for. Nevertheless, the advantage of low level code is that it is usually faster due to the fact that it is indeed written taking advantage of the possibilities of a specific machine.

A higher or lower level of programming is to be chosen for a specific project depending on the type of program that is being developed. For example, when a hardware driver is developed for an operating system obviously a very low level is used for programming. While when big applications are developed usually a higher level is chosen, or a combination of critic parts written in low level languages and others in higher ones.

Although there are languages that are clearly thought to be low level, like Assembly, whose instruction sets are adapted to each machine the code is made for, and other languages are inherently high level, like the Java, that is designed to be totally independent of the platform where is going to run. The C++ language is in a middle position, since it can interact directly with the hardware almost with no limitations, and can as well abstract lower layers and work like one of the most powerful high level languages.

Why C++?

C++ has certain characteristics over other programming languages. The most remarkable are:

Object-oriented programming
The possibility to orientate programming to objects allows the programmer to design applications from a point of view more like a communication between objects rather than on a structured sequence of code. In addition it allows a greater reusability of code in a more logical and productive way.
Portability
You can practically compile the same C++ code in almost any type of computer and operating system without making any changes. C++ is the most used and ported programming language in the world.
Brevity
Code written in C++ is very short in comparison with other languages, since the use of special characters is preferred to key words, saving some effort to the programmer (and prolonging the life of our keyboards!).
Modular programming
An application's body in C++ can be made up of several source code files that are compiled separately and then linked together. Saving time since it is not necessary to recompile the complete application when making a single change but only the file that contains it. In addition, this characteristic allows to link C++ code with code produced in other languages, such as Assembler or C.
C Compatibility
C++ is backwards compatible with the C language. Any code written in C can easily be included in a C++ program without making any change.
Speed
The resulting code from a C++ compilation is very efficient, due indeed to its duality as high-level and low-level language and to the reduced size of the language itself.

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值