C ++ programming how −to
Last Update:2018-12-07
Source: Internet
Author: User
Www. linuxselfhelp.
C OM/ Howto/
C ++
Programming-howto -13.html
Table of contents
C ++ programming how −to ................................. ........................................ ........................................ .......... 1
Al Dev (alavoor vasudevan) alavoor@yahoo.com ....................................... ........................................ 1
1. introduction ....................................... ........................................ ........................................ .................. 1
2. string class varieties ..................................... ........................................ ........................................ ..... 1
3. best C ++ compilers for MS Windows 2000/NT/95/98/ME/XP ....................... .................................. 1
4. download string ...................................... ........................................ ........................................ .......... 1
5. How can I trust Al Dev's string class ?? ........................................ ........................................ ........... 1
6. usage of string class .................................... ........................................ ........................................ ....... 1
7. string. h file ...................................... ........................................ ........................................ ................... 1
8. renaming the string class .................................... ........................................ ........................................ 2
9. file class ...................................... ........................................ ........................................ ....................... 2
10. c ++ zap (delete) function ....................................... ........................................ ................................. 2
11. pointers are problems ..................................... ........................................ ........................................... 2
12. usage of my_malloc and my_free ................................... ........................................ ......................... 2
13. debug files ...................................... ........................................ ........................................ .................. 2
14. java like API ..................................... ........................................ ........................................ ................ 2
15. IDE tools for C ++ .................................. ........................................ ........................................ ........... 2
16. c ++ online textbooks and docs ................................. ........................................ ............................. 2
17. c ++ coding standards ................................... ........................................ ........................................... 2
18. c ++ online docs ................................... ........................................ ........................................ ........... 2
19. memory tools ...................................... ........................................ ........................................ ............. 2
20. related URLs ...................................... ........................................ ........................................ .............. 2
21. c ++ scripting languages ages ................................... ........................................ ....................................... 2
22. templates ....................................... ........................................ ........................................ ................... 3
23. STL references ...................................... ........................................ ........................................ .......... 3
24. threads in C ++ ................................... ........................................ ........................................ .............. 3
25. c ++ utilities .................................... ........................................ ........................................ ................. 3
26. other formats of this document ................................... ........................................ ............................. 3
27. copyright ....................................... ........................................ ........................................ ................... 3
28. appendix A string program files ................................... ........................................ ......................... 3
1. introduction ....................................... ........................................ ........................................ .................. 3
1.1 C ++ v/s Java ................................ ........................................ ........................................ ...................... 4
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. best C ++ compilers for MS Windows 2000/NT/95/98/ME/XP ....................... ................................. 8
4. download string ...................................... ........................................ ........................................ ......... 9
5. How can I trust Al Dev's string class ?? ........................................ ........................................ .......... 9
6. usage of string class .................................... ........................................ ........................................ ....... 9
6.1 operators ...................................... ........................................ ........................................ ................... 10
6.2 functions ...................................... ........................................ ........................................ ................... 11
7. string. h file ...................................... ........................................ ........................................ ................. 11
7.1 stringbuffer. H ....................................... ........................................ ........................................ .......... 17
7.2 stringtokenizer. H ....................................... ........................................ ........................................ ...... 18
8. renaming the string class .................................... ........................................ ...................................... 19
8.1 Case 1: simple rename ...................................... ........................................ ....................................... 19
C ++ programming how −to
I
Table of contents
8.2 Case 2: resolve conflict ...................................... ........................................ ..................................... 19
9. file class ...................................... ........................................ ........................................ ..................... 20
10. c ++ zap (delete) function ....................................... ........................................ .............................. 20
11. pointers are problems ..................................... ........................................ ........................................ 21
12. usage of my_malloc and my_free ................................... ........................................ ...................... 22
12.1 Garbage Collector for C ++ ................................. ........................................ ................................. 24
13. debug files ...................................... ........................................ ........................................ ................ 24
14. java like API ..................................... ........................................ ........................................ .............. 24
15. IDE tools for C ++ .................................. ........................................ ........................................ ........ 24
16. c ++ online textbooks and docs ................................. ........................................ .......................... 25
17. c ++ coding standards ................................... ........................................ ........................................ .. 25
18. c ++ online docs ................................... ........................................ ........................................ ......... 27
18.1 C ++ tutorials ................................... ........................................ ........................................ ............. 28
18.2 useful links ..................................... ........................................ ........................................ .............. 28
18.3 C ++ quick −reference ................................. ........................................ ........................................ .. 28
18.4 C ++ Usenet newsgroups .................................. ........................................ ..................................... 28
19. memory tools ...................................... ........................................ ........................................ ........... 28
20. related URLs ...................................... ........................................ ........................................ ............ 29
21. c ++ scripting languages ages ................................... ........................................ ..................................... 29
21.1 pike (C/C ++ scripting language )............................. ........................................ ........................... 29
21.2 softintegration CH (C/C ++ scripting language )............................ ........................................ ....... 30
21.3 PHP (C ++ scripting language )............................... ........................................ .............................. 30
22. templates ....................................... ........................................ ........................................ ................. 30
23. STL references ...................................... ........................................ ........................................ ........ 31
23.1 overview of the STL ................................... ........................................ ......................................... 31
23.2 header files ..................................... ........................................ ........................................ ............. 33
23.3 The container classes interface ................................... ........................................ ........................ 33
23.4 vectors ...................................... ........................................ ........................................ ................... 34
Constructing vectors ...................................... ........................................ ................................. 34
Checking up on your vector ................................... ........................................ ....................... 35
Accessing elements of a vector ................................... ........................................ ................... 35
Inserting and erasing vector elements ................................... ........................................ ........ 37
Vector iterators ...................................... ........................................ ........................................ .. 38
Comparing vectors ...................................... ........................................ .................................... 39
23.5 iterators and the STL ................................... ........................................ ........................................ .. 40
23.6 lists ...................................... ........................................ ........................................ ......................... 40
23.7 sets ...................................... ........................................ ........................................ ......................... 40
Constructing sets ...................................... ........................................ ........................................ 40
What are function objects ?................................... ........................................ ........................... 41
A printing utility ..................................... ........................................ ......................................... 44
How many elements ?.................................... ........................................ ................................... 44
Checking the integrity of sets ................................... ........................................ ....................... 45
Adding and deleting elements .................................... ........................................ ..................... 46
Finding elements ...................................... ........................................ ........................................ 47
Set theoretic operations ..................................... ........................................ ............................. 48
23.8 maps ...................................... ........................................ ........................................ ........................ 50
23.9 STL algorithms ..................................... ........................................ ........................................ ....... 50
24. threads in C ++ ................................... ........................................ ........................................ ............ 50
C ++ programming how −to
II
Table of contents
24.1 threads tutorial ..................................... ........................................ ........................................ ....... 51
24.2 designing a Thread class in C ++ ............................... ........................................ ........................... 51
Introduction ....................................... ........................................ ........................................ ....... 51
Brief Introduction to threads .................................... ........................................ ...................... 51
Basic approach ...................................... ........................................ ........................................ .. 52
The implementation ...................................... ........................................ ................................... 52
Using the Thread class .................................... ........................................ ................................ 53
Conclusion ....................................... ........................................ ........................................ ........ 54
25. c ++ utilities .................................... ........................................ ........................................ ............... 54
26. other formats of this document ................................... ........................................ ...........................