[c++编程.ppt

  1. 1、本文档共32页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[c编程

对齐 程序的分界符‘{’和‘}’应独占一行并且位于同一列,同时与引用它们的语句左对齐。 }之内的代码块在‘{’右边数格处左对齐。 注释 注释通常用于: (1)版本、版权声明; (2)函数接口说明; (3)重要的代码行或段落提示。 虽然注释有助于理解代码,但注意不可过多地使用注释。 类的版式 建议以“行为”为中心,先接口,再数据,先public, 再private。 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. Chapter One: Introduction * As we saw, C++ was developed from C. C versus C++ Question: Is C++ the best language? (Better than C?) This sometimes become a political play ball which I don’t want to become involved in. C++ offers certain advantages over C which we will be presented as we progress. 2 things to keep in mind however: A language should be used to solve the particular problem faced as well as the environment. For example, you won’t write a database application in Fortran anymore than you will try to manipulate matrices in Cobol. Another example where the environment is crucial is for instance Java in an embedded solution as oppose to C or C++. For programming in general, a bad coding style will result in a bad program, no matter what language is being used. The transition from C to C++ does not only require the developer to learn the new language features. More important is the different view that has to be taken when analyzing a problem and designing a solution. C++ is bridging the gap from a pure procedural way (algorithms) to an object orientated analysis of the problem domain. Remember that we are not only talking of implementing an algorithm (that is usually the easy part). The scope of an environment is usually larger than just implementing an algorithm. There are also interactions between other systems, software etc. Thus, thought has to be put into how this algorithm fits into the grand structure. It is believed that C++ allows a more natural and effective way to deal with this problem. Some additional ideas on programming and software engineering. Programming – that act of writing code and creating a program Software engineering – includ

文档评论(0)

wendan118 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档