c++编程新手错误分析(C++ programming novice error analysis).doc

c++编程新手错误分析(C++ programming novice error analysis).doc

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

c++编程新手错误分析(C++ programming novice error analysis) (1) my program is all right, but it doesnt work. Think about your surroundings. Is there anyone who says that? If you had said, that stop, dont say these words, because these words will only show the speakers ignorance. Since the program is all right, then why is it wrong? (2) program = algorithm + data structure If we have just finished learning the C language, we say this is understandable, and it can be said to be correct. But if youre a programmer whos about to start working on C/C++ programming, then its a pity that this statement can only be a mistake, but theres another way in the world: Program = object + message The program = algorithm + data structure is set up only for process oriented language (C), whereas object oriented language (C++) can only be expressed as program = object + message. The traditional procedural programming language is process centric, algorithm driven, and object oriented programming languages are object centric and message driven. The message here is generalized, and object A calls the member function of object B, which can be treated as object A to send message to B. (3) compile the program and run it correctly. Running the right program is not always a good program. One of the things that programmers must keep in mind is that the programs they write are not only for themselves, but also for others to understand easily. Unfortunately, many programming novices do not have a clear grasp of the softwares structure. The concepts of the header file and the implementation file are ambiguous and the written program is poorly readable. C program adopts modular programming idea. It needs to divide a large software into a series of functional independent parts, and cooperate with each other to complete the system requirements. Module header file and implementation files, correct use of documents and files is wrong: Rule 1 header files (.H) is for the module interface declaration, including t

文档评论(0)

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

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

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档