随笔 - 29  文章 - 13  trackbacks - 0
<2006年8月>
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

常用链接

留言簿(1)

随笔分类

随笔档案

文章分类

文章档案

相册

收藏夹

c++

Linux

Tools

搜索

  •  

最新评论

阅读排行榜

评论排行榜

原文地址:http://www.cetus-links.org/oo_c_plus_plus.html


  • See also Visual C++C#
  • Intro
    • "C++ is an "object oriented" language. Object oriented programming is a reaction to programming problems that were first seen in large programs being developed in the 70s. All object oriented languages try to accomplish three things as a way of thwarting the problems inherent in large projects: (1) object oriented languages all implement "data abstraction" in a clean way using a concept called "classes"; (2) all object oriented languages try to make parts of programs easily reusable and extensible; (3) object oriented languages try to make existing code easily modifiable without actually changing the code.
    • Since C++ is an object oriented language, it possesses the three object oriented benefits discussed above. C++ adds two other enhancements of its own to clean up problems in the original C language or to make programming in C++ easier than it is in C: (1) C++ adds a concept called "operator overloading"; (2) C++ also cleans up the implementation of several portions of the C language, most importantly I/O and memory allocation.
    • C++ solves many other problems as well. For example, it solves the "common code replicated in many places" problem by letting you factor out common code in a third dimension. It solves the "I want to change the parameter type passed into a function without changing the function" problem by letting you overload the same function name with multiple parameter lists. It solves the "I want to make a tiny change to the way this works, but I don't have the source for it" problem, and at the same time it also solves the "I want to redo this function completely but not change the rest of the library" problem using inheritance. It makes the creation of libraries much cleaner. It drastically improves the maintainability of code. And so on." (Marshall Brain & Kelly Campbell)
  • Contents
  • Other pages

posted on 2006-08-08 17:54 四海 阅读(870) 评论(1)  编辑 收藏 引用 所属分类: c++

FeedBack:
# Hello! 2006-11-03 05:19 xujiashuai
Hello! I just studied use M S N Not the good friend I wants to look for several friends Wants to make the friend with me Please add my M S N; Woainidashuai@hotmail.com  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理