分享
 
 
 

Description of C++

王朝c/c++·作者佚名  2006-01-06
窄屏简体版  字體: |||超大  

作者:cplusplus.com      出自:cplusplus.com

Programs

Nowadays computers are able to perform many different tasks, from simple mathematical operations to sophisticated graphical representations. These different tasks are not made by the computer 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 for which it is not programmed, so it can only follow the instructions of the programs which it has been programmed for. And the ones in charge to generate programs so that the computers may perform new tasks are the programmers, who use for that the instructions of a programming language.

Programming languages

When choosing a programming language to make a project, many different considerations can be had.

First one is what it is known as "level of the programming language". The level determines how near to the hardware the programming language is. In "low level" languages instructions are written thinking directly on the interperformance 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 smaller number of modifications, whereas a low-level language is limited by peculiarides of the hardware for which it was written. Nevertheless low level code is usually faster indeed due to that it is written taking advantage of the possibilities of a concrete machine.

The type of programming which we must choose for a concrete project depends on the type of program that we want to make. For example, when programming a driver for an operating system obviously we will use low level programming. Whereas when programming great applications usually a higher level it is used, or a combination of critic parts written in low level languages and others in higher.

Although there are languages that are clearly low level, like Assembler, whose instructions vary according to the processor which the code is made for, and others of high level, like the JAVA, that is totally independent from the platform. The C++ language is in a middle term, since it can interact directly with the hardware almost without any limitation, as well as with the support of suitable specific libraries, works like one of the more powerful high-level languages.

Why C++?

C++ has certain characteristics over other programming languages. 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 that on a structured sequence of code. In addition it allows the 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 hardly making changes. C++ is one of the most used and ported to different platforms programming language.

Brevity

Code written in C++ is very short in comparison with other languages, since the use of special characters is preferred before key words, saving effort (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 needed 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 like Assembler or C.

C Compatibility

Any code written in C can easily be included in a C++ program without hardly making changes.

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. 

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有