|
|
||
|
Welcome to C, C++ AND STL TUTORIAL HANDS ON APPROACH |
||
|
|
last updated: June 2005 |
|
|
|
Experience A Not So Complete C, C++ And STL Journey, Hands On Approach Through Working Program Examples And Experiments. From Structured, Object Oriented to Generic Programming. What You Compile Is What You Get. Get The Best From Both Worlds. |
|
|
|
||
|
For a complete Tutorial with download, faster line is hosted and updated at: www.tenouk.com |
||
|
Table Of Content Part I - C procedural programming |
~~Some Stories~~ This Tutorial is a compilation notes prepared by lazy teachers, for fresh students pursuing certificate, diploma and first degree, that don't ever have experience writing a single line of code. With various levels of their average IQs, it is very challenging to make them understand and write their own simple codes. Another challenge is the abstraction of the programming language itself. Here, you are not just read the 'story', by executing the codes you make the 'story'. Some analytical thinking also needed… The source codes for the working examples used, mix of C and C++ (…It is not recommended mixing C and C++ codes in one program…) and when approaching the end of the Tutorial, more C++ codes, till all the codes are in C++. For Standard and non Standard Libraries, header files, portability, backward compatibility and obsolete things, before you start compiling, please read Module 23: Namespace mainly Section 23.3 so that you know how to do a small modification to any program examples you found in the books or internet domain to suit your compilers when needed. At the beginning the examples compiled using Borland C++ 4.x, 5.x, then some compiled using Visual C++ 5.x and 6.x. In the latest updates, there are examples compiled using Visual C++ 7.x/.Net, GCC (for C) and G++ (for C++) given at the end of the Modules. Borland version 6.x and BuilderX also used for some of the examples but for simple programs these compilers quite 'heavy' lol! During the preparation of these notes, OSes used dominated by Windows OS starting from Windows 98/SE, 2000 Server, 2000 Pro, Xp and Finally Linux / Fedora. The machines used were desktops, servers and notebooks. In the latest update, GCC, G++ and GDB pages for their commands and options also included . Based on the OSes, machines and compilers used, that is why it is called a Journey . It is targeted for beginner, intermediate and advanced (general) programmers. This Tutorial is design for result oriented, by working examples and experiments, not by definition. At the end its extra purpose is to abandon your reference books and lecturers. For Windows OS, all program examples using win32 empty console mode application except whenever mentioned. There is no GUI programming here. All the examples presented in the 'debug mode', so that we can learn what have had happened when we do the compiling/building, linking and running/executing the programs. Where ever possible program examples were based on the ANSI (ISO/IEC) C/C++ standard, as far as my 'dream' concerned because there are quite a lot of extensions or implementations dependent out there making newbie even more confused when they start learning C / C++ programming. What the hell when you compile just 10 lines of code but the errors are 20 lines of codes huh?
The objectives of this Tutorial may be (you decide lol!):
▪ To have fun. ▪ To pass your exam. ▪ To become a programmer? ▪ To fill up your empty head. ▪ To learn cut/copy and paste, at the end cheat your lecturers. ▪ To cheat your compilers. ▪ To become script kiddies. ▪ To show off.
You will learn a lot more things when you write and execute codes (...and your own codes). Scrutinizing, tweaking the source codes and the output will make you understand better. Difficult but most important Modules may be Functions, Arrays, Pointers, Part II and III.
The Benefits: Depend on your effort! Some get 50 %, some get 70% and some even get nothing! But it can accelerate your learning process, shorten the training period, budding your analytical thinking, making the difficult Topics simpler.
What you have to do to reap the benefits? ▪ Study the Tutorial. ▪ Try all the examples. ▪ Learn through the program output and the source codes. ▪ Do the program source code modification, and re-run the program, see the program output changes. ▪ Create your own program, although it is just a simple program. The learning sequence is Part I→Part II→Part III. Modules in C++ that covered in C will not be repeated such as Functions, Arrays and Pointers.
So, what is your next step? After you have completed this Tutorial with some knowledge and skills 'successfully', hopefully it should be 'easier' for you to learn and master other object oriented or Windowz based programming languages such as VB® / VB.Net®, C#®, Java etc. At this level you have to master what, which, why and how the member functions, classes etc. been manipulated. And which header files to be used. And how to program the Graphic User Interface (GUI). And also how to write a proper syntax and where to put the codes. Or you can start learning something like a Managed C++, though it is not a new wave in programming, using the Common Language Runtime (CLR). GoOd LuCk dudes! Have a nice journey!
Notes: You can remove the system("pause"); code from stdlib.h header file for the related program examples. This code just for capturing the output screen snapshot for Borland® C++. For Microsoft Visual® C++/.Net®, Borland Turbo®, GCC etc, no need to include this code. For other compilers, please check their documentations.
Wow!!! No more space available for other Modules after the update! A complete Tutorial with download is hosted and updated at www.tenouk.com. Let see how long tenouk.com will float on the internet domain. If you think it is useful, please give her a support! This site will not be updated anymore because no more space available. |
Table Of Content Part III - C++ Generic Programming The Standard Template Library, STL |
|
BASIC
STATEMENTS, EXPRESSIONS and OPERATORS
TYPE SPECIFIERS struct, typedef, union and enum
-----EXTRAS-----
SOME STORY OF COMPILER, ASSEMBLER and LINKER
C CHARACTERS and STRINGS MANIPULATION
THE main() and COMMAND LINE ARGUMENTS
C STORAGE and MEMORY ALLOCATION
--MORE-- GNU C Network Programming
Part 1
Part 2
Part 3
Part 4
Part 5
|
Part 1 vector, deque
Continued at
CONTAINER Part 2 list, set, multiset
CONTAINER Part 3 map, multimap, hash_map, hash_multimap, hash_set, hash_multiset
CONTAINER ADAPTORS stack, queue
ITERATOR Part 1
ITERATOR Part 2 iterator adaptors
ALGORITHM Part 1 Introduction
ALGORITHM Part 2 Member Functions
ALGORITHM Part 3 Member Functions
ALGORITHM Part 4 Member Functions
ALGORITHM Part 5 Member Functions
C++ CHARACTERS and STRINGS MANIPULATION Part 1
C++ CHARACTERS and STRINGS MANIPULATION Part 2
FUNCTION OBJECTS Functor
|
|
|
Table Of Content Part II - C++ Object Oriented Idea |
Kick start: Setting up the programming environment |
|
|
Part 1 Objects and Classes
Part 2 Class Manipulation
Part 1 Class Inheritance
Part 2
Part 3 Multi Inheritance
STORAGE CLASS const, volatile, static, auto, register
|
Borland C++ 4.x/5.x
Borland C++ Builder 6
Borland BuilderX
Microsoft Visual C++ 5.0/6.0
Microsoft Visual C++ 7.0/.Net
Part 1
Part 2
MORE at tenouk.com |
|
|
For a complete Tutorial with download, faster line, is hosted and updated at: www.tenouk.com |
||
|
|
|
|
|
|
Terms and Disclaimer This is unedited and unverified manuscript. Published as is basis for educational, recreational and brain teaser purposes. All trademarks, copyrighted items, IPs, wherever exist, are the sole property of their respective owners. Any damage, destruction or loss by using the materials presented in this site is your responsibility. For personal use ONLY, part or full distribution, reproduction, without permission is strictly prohibited. Accessing this site means you have agreed to these terms. ~~~Link is appreciated~~~ |
|
|
Best viewed using IE 4.0 and SerigalApi 1.0.0 and above but if your eyes can view the pages, that is the best resolution. |
||
|
Copyright 2003 2004 2005 © Tenouk. All rights reserved. |
||