- 论坛徽章:
- 0
|
.
哦,你问的问题太深奥了。C 和 C++ 是两种语言。无论在哪儿,两种语言都有非常大的差别。首先是标准的差异。C 里很多习以为常的标准,到了 C++ 这边就用不上了。比如 '\0',在 C 里它是一个 int,但在 C++ 中是 char。其次是编程思想的差异。你也提到,C++ 面向对象,C 面向过程。这是主要的编程思想差异。不少细微的差别也只有系统地学完两种语言的某个子集后才能发现出一部分。还有历史的差异。历史把 C 推向了 Unix 发展的风口浪尖,而 C++ 的历史可以参考这一段文字:
Stroustrup began work on C with Classes in 1979. The idea of creating a new language originated from Stroustrup's experience in programming for his Ph.D. thesis. Stroustrup found that Simula had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level and unsuitable for large software development. When Stroustrup started working in Bell Labs, he had the problem of analyzing the UNIX kernel with respect to distributed computing. Remembering his Ph.D. experience, Stroustrup set out to enhance the C language with Simula-like features. C was chosen because it is general-purpose, fast, and portable. Besides C and Simula, some other languages which inspired him were ALGOL 68, Ada, CLU and ML. At first, the class, derived class, strong type checking, inlining, and default argument features were added to C via Cfront. The first commercial release occurred in October 1985.[1]
In 1983, the name of the language was changed from C with Classes to C++. New features were added including virtual functions, function name and operator overloading, references, constants, user-controlled free-store memory control, improved type checking, and a new single-line comment style with two forward slashes (//). In 1985, the first edition of The C++ Programming Language was released, providing an important reference to the language, as there was not yet an official standard. In 1989, Release 2.0 of C++ was released. New features included multiple inheritance, abstract classes, static member functions, const member functions, and protected members. In 1990, The Annotated C++ Reference Manual was published. This work became the basis for the future standard. Late addition of features included templates, exceptions, namespaces, new casts, and a Boolean type.
As the C++ language evolved, a standard library also evolved with it. The first addition to the C++ standard library was the stream I/O library which provided facilities to replace the traditional C functions such as printf and scanf. Later, among the most significant additions to the standard library, was the Standard Template Library.
After years of work, a joint ANSI-ISO committee standardized C++ in 1998 (ISO/IEC 14882:1998). For some years after the official release of the standard in 1998, the committee processed defect reports, and published a corrected version of the C++ standard in 2003. In 2005, a technical report, called the "Library Technical Report 1" (often known as TR1 for short) was released. While not an official part of the standard, it gives a number of extensions to the standard library which are expected to be included in the next version of C++. Support for TR1 is growing in almost all currently maintained C++ compilers.
While the C++ language is royalty-free, the standard document itself is not freely available.
http://en.wikipedia.org/wiki/C++
随便哪一种编程语言,只要你能用好,就都是你的工具了。初学就用 Qt,个人认为这不合适。
. |
|