{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

C++ Programming HOW-TO - C Programming HOW-TO C Programming...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
C++ Programming HOW-TO
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Table of Contents C++ Programming HOW-TO ........................................................................................................................... 1 Al Dev (Alavoor Vasudevan) [email protected] ............................................................................... 1 1. Introduction .......................................................................................................................................... 1 2. String Class Varieties .......................................................................................................................... 1 3. Download String ................................................................................................................................. 1 4. Usage of String class ............................................................................................................................ 1 5. String.h file .......................................................................................................................................... 1 6. Renaming the String class .................................................................................................................... 1 7. File Class .............................................................................................................................................. 2 8. C++ Zap (Delete) function .................................................................................................................. 2 9. Pointers are problems .......................................................................................................................... 2 10. Usage of my_malloc and my_free .................................................................................................... 2 11. Debug files ......................................................................................................................................... 2 12. Java like API ...................................................................................................................................... 2 13. IDE tools for C++ ............................................................................................................................. 2 14. C++ Online Textbooks and Docs ...................................................................................................... 2 15. C++ Coding Standards ....................................................................................................................... 2 16. C++ Online Docs ............................................................................................................................... 2 17. Memory Tools .................................................................................................................................... 2 18. Related URLs ..................................................................................................................................... 2 19. C++ Scripting Languages .................................................................................................................. 2 20. Templates ........................................................................................................................................... 2 21. STL References ................................................................................................................................. 2 22. Threads in C++ .................................................................................................................................. 3 23. C++ Utilities ...................................................................................................................................... 3 24. Other Formats of this Document ........................................................................................................ 3 25. Copyright ........................................................................................................................................... 3 26. Appendix A String Program Files .................................................................................................... 3 1. Introduction .......................................................................................................................................... 3 1.1 C++ v/s Java ....................................................................................................................................... 3 1.2 Which one Ada95, "C", "C++" or Java ?? ......................................................................................... 4 1.3 Problems facing the current C++ compilers ...................................................................................... 5 1.4 COOP - C++ Object Oriented Programming-language ................................................................... 6 2. String Class Varieties ......................................................................................................................... 7 2.1 Multiple Inheritance - Sample Custom String class ........................................................................ 7 3. Download String ................................................................................................................................ 8 4. Usage of String class ............................................................................................................................ 8 4.1 Operators ............................................................................................................................................ 9 4.2 Functions ............................................................................................................................................ 9 5. String.h file ........................................................................................................................................ 10 6. Renaming the String class .................................................................................................................. 18 6.1 Case 1: Simple rename ..................................................................................................................... 18 6.2 Case 2: Resolve conflict ................................................................................................................... 18 7. File Class ............................................................................................................................................ 19 8. C++ Zap (Delete) function ............................................................................................................... 19 9. Pointers are problems ....................................................................................................................... 20 10. Usage of my_malloc and my_free ................................................................................................. 21 10.1 Garbage Collector for C++ .......................................................................................................... 22 C++ Programming HOW-TO i
Background image of page 2
Table of Contents 11. Debug files ....................................................................................................................................... 23 12. Java like API .................................................................................................................................... 23 13. IDE tools for C++ .......................................................................................................................... 23 14. C++ Online Textbooks and Docs ................................................................................................... 24 15. C++ Coding Standards ..................................................................................................................... 24 16. C++ Online Docs ............................................................................................................................. 26 16.1 C++ Tutorials ................................................................................................................................. 26 16.2 Useful links .................................................................................................................................... 27 16.3 C++ Quick-Reference ................................................................................................................... 27 16.4 C++ Usenet Newsgroups ............................................................................................................... 27 17. Memory Tools .................................................................................................................................. 27 18. Related URLs ................................................................................................................................... 27 19. C++ Scripting Languages ................................................................................................................ 28 19.1 PIKE (C/C++ Scripting Language) ................................................................................................ 28 19.2 PHP (C++ Scripting Language) ..................................................................................................... 28 20. Templates ......................................................................................................................................... 28 21. STL References .............................................................................................................................. 29 21.1 Overview of the STL .................................................................................................................... 30 21.2 Header Files ................................................................................................................................... 31 21.3 The Container Classes Interface ................................................................................................... 31 21.4 Vectors .......................................................................................................................................... 32 Constructing Vectors ............................................................................................................... 32 Checking Up on Your Vector .................................................................................................. 33 Accessing Elements of a Vector .............................................................................................. 34 Inserting and Erasing Vector Elements ................................................................................... 35 Vector Iterators ........................................................................................................................ 36 Comparing Vectors .................................................................................................................. 37 21.5 Iterators and the STL ..................................................................................................................... 38 21.6 Lists ................................................................................................................................................ 38 21.7 Sets ................................................................................................................................................ 38 Constructing Sets ...................................................................................................................... 38 What are Function Objects? ...................................................................................................... 40 A Printing Utility ...................................................................................................................... 42 How Many Elements? ............................................................................................................... 43 Checking the Equality of Sets .................................................................................................. 43 Adding and Deleting Elements ................................................................................................. 44 Finding Elements ...................................................................................................................... 45 Set Theoretic Operations .......................................................................................................... 46 21.8 Maps ............................................................................................................................................... 48 21.9 STL Algorithms ............................................................................................................................. 49 22. Threads in C++ ................................................................................................................................ 49 22.1 Threads Tutorial ............................................................................................................................. 49 22.2 Designing a Thread Class in C++ .................................................................................................. 49 Introduction ............................................................................................................................... 50 Brief Introduction To Threads .................................................................................................. 50 Basic Approach ......................................................................................................................... 50 The Implementation .................................................................................................................. 50 Using The Thread Class ............................................................................................................ 52 C++ Programming HOW-TO ii
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Table of Contents Conclusion ................................................................................................................................ 52 23. C++ Utilities .................................................................................................................................... 52 24. Other Formats of this Document ...................................................................................................... 53 25. Copyright ......................................................................................................................................... 54 26. Appendix A String Program Files ................................................................................................. 55 C++ Programming HOW-TO iii
Background image of page 4
C++ Programming HOW-TO Al Dev (Alavoor Vasudevan) [email protected] v37.0, 27 April 2001 This document provides a comprehensive list of C++ URL pointers, links to C++ online textbooks, and programming tips on C++. This document also provides a C++ library which imitates Java-language, and which has various methods to avoid memory problems in C++. Using this library you can compile Java's source code under C++. This document serves as a "Home of C++ language". The information given here
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}