- 1、本文档共12页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 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
您可能关注的文档
- 23《美丽的小兴安岭》教学设计之九(23 beautiful little Xingan Ling teaching design nine).doc
- 2d游戏设计浅谈(Discussion on game design 2D).doc
- 2到3岁宝宝语言学习游戏(2 to 3 years old baby language learning games).doc
- 2d网络游戏排行榜排行(2D online game Ranking Ranking).doc
- 2春雨的色彩教学反思(Reflection on the 2 spring color teaching).doc
- 2b论文(2B paper).doc
- 3 2011年6月25日电子商务员考证理论真题答案(June 25, 32011 Electronic Commerce member theory research Zhenti answer).doc
- 3-disc 理论介绍(三碟理论介绍).doc
- 3.3v转5v 电平转换方法参考(3.3V 5V level conversion method).doc
- 36计记忆详解(A first memory.).doc
文档评论(0)