Java程序员速通C++:从Java到C++的核心差异与实践

需积分: 9 1 下载量 157 浏览量 更新于2024-07-22 收藏 3.18MB PDF 举报
"C++ for Java Programmers(全英版)"是一本专为那些熟悉面向对象编程(如Java)的读者设计的快速入门指南,旨在帮助他们学习C++语言。随着Java逐渐成为初学者的首选,尽管C++由于其复杂性在工业界需求依旧旺盛,但考虑到初学者的需求,本书并未详述基础概念,而是侧重于比较和展示Java与C++之间的差异,以及如何在C++中实现相应功能。 本书首先回顾了C++的历史背景,指出它在早期计算机科学课程中的地位,以及尽管Java兴起,C++的持续广泛使用。章节0.2讨论了两者的高阶差异,包括编译与解释代码的区别、安全性和健壮性的考量、多线程支持以及API的不同。作者列出了使用C++的十大理由,如模板的灵活性、运算符重载的表达式增强、标准模板库的强大功能、自动资源回收的优势、条件编译的便利性,以及C++在访问器和修改器、多重继承以及空间效率方面的独特之处。 第1章介绍了基础类型和控制结构,通过实例演示如何编写第一个C++程序,包括`main`函数的使用、预处理器的作用、`using`指令以及输出语句。章节内容涵盖了基本的数据类型,如整型、浮点型、字符型和布尔型,以及语法上的差异,比如运算符和表达式、条件判断和循环结构的用法。 总体来说,这本书旨在为Java程序员提供一条简洁明了的学习路径,帮助他们理解和掌握C++语言的关键特性,而无需深入挖掘每个概念的基础理论,适合有一定编程经验的读者作为进阶教材使用。对于完全没有编程经验的学生,可能需要先通过更基础的教程建立基础。
2009-02-11 上传
C++ for Programmers: Deitel Developer Series by Paul Deitel, Harvey Deitel release type: eBook (.chm) release size: 4.80 MB Publisher: Prentice Hall PTR Pub Date: February 2, 2009 Print ISBN-10: 0137001304 Print ISBN-13: 978-0137001309 PRACTICAL, EXAMPLE-RICH COVERAGE OF: Classes, Objects, Encapsulation, Inheritance, Polymorphism Integrated OOP Case Studies: Time, GradeBook, Employee Industrial-Strength, 95-Page OOD/UML® 2 ATM Case Study Standard Template Library (STL): Containers, Iterators and Algorithms I/O, Types, Control Statements, Functions Arrays, Vectors, Pointers, References String Class, C-Style Strings Operator Overloading, Templates Exception Handling, Files Bit and Character Manipulation Boost Libraries and the Future of C++ GNU™ and Visual C++® Debuggers And more… VISIT WWW.DEITEL.COM For information on Deitel® Dive-Into® Series corporate training courses offered at customer sites worldwide (or write to deitel@deitel.com) Download code examples Check out the growing list of programming, Web 2.0 and software-related Resource Centers To receive updates for this book, subscribe to the free DEITEL® BUZZ ONLINE e-mail newsletter at www.deitel.com/newsletter/subscribe.html Read archived issues of the DEITEL® BUZZ ONLINE The professional programmer’s DEITEL® guide to C++ and object-oriented application development Written for programmers with a background in high-level language programming, this book applies the Deitel signature live-code approach to teaching programming and explores the C++ language and C++ Standard Libraries in depth. The book presents the concepts in the context of fully tested programs, complete with syntax shading, code highlighting, code walkthroughs and program outputs. The book features 240 C++ applications with over 15,000 lines of proven C++ code, and hundreds of tips that will help you build robust applications. Start with an introduction to C++ using an early classes and objects approach, then rapidly move on to more advanced topics, including templates, exception handling, the Standard Template Library (STL) and selected features from the Boost libraries. You’ll enjoy the Deitels’ classic treatment of object-oriented programming and the OOD/UML® 2 ATM case study, including a complete C++ implementation. When you’re finished, you’ll have everything you need to build object-oriented C++ applications.
2014-03-13 上传
Book Description Written for the moderately experienced Java programmer, this book builds on readers¿ existing knowledge of object-oriented programming and covers all important aspects of Standard C++—emphasizing more lower-level C-style details later in the presentation. Chapter topics include philosophy of C++, simplest C++, pointers and reference variables, object-based programming: classes, operator overloading, object-oriented programming: inheritance, templates, abnormal control flow, input and output, collections: the standard template library, primitive arrays and strings, C-style C++, and using Java and C++: the JNI. For new C++ programmers converted from Java. For experienced Java programmers and students who require the skills of C++ programming, best-selling author Mark Allen Weiss bridges the gap. He efficiently presents the complex C++ language in this well-designed tutorial/reference that both students and seasoned programmers will appreciate. The book is ideal as a primary text for intermediate C++ courses, as a supplemental no-nonsense reference for other courses, or for independent learning by professionals. C++ for Java Programmers is a concise, well-written text that provides authoritative and up-to-date coverage of key features and details of C++, with a special focus on how C++ compares to Java. The book's approach shows knowledgeable students or professionals how to grasp the complexities of C++ and harness its power by mutually addressing the benefits and the pitfalls of the two languages. By highlighting the features and comparative elements of each language, and building on the reader's existing knowledge of object-oriented programming, C++ for Java Programmers enables users to master the essentials of C++ quickly and thoroughly. Key Features Includes insightful comparisons of the two programming languages throughout the text and points out the subtleties of C++ Succinctly covers the pertinent highlights of STL (Standard Template Library) and the most effective use of templates Explains the use of the powerful JNI (Java Native Interface) for combining Java and C++ Includes a summary of key C++ features and issues with each chapter Provides extensive treatment of C details the programmer is likely to encounter in C++ Companion Website for complete online source code at: http://www.prenhall.com/weiss Available Instructors Resource CD-ROM Product Details Paperback: 304 pages Publisher: Prentice Hall; 1 edition (November 7, 2003) Language: English ISBN-10: 013919424X ISBN-13: 978-0139194245 Product Dimensions: 9.5 x 6.8 x 0.6 inches