Sie sind auf Seite 1von 8

1

PHStudios.com Tutorials

C++ Basic Series: Introduction


Text Edition

Copyright 2008 PH Studios, All Rights Reserved.

Contents
Section I About C++
Part I Introduction II Advantages and Disadvantages III Series Overview

3
3 4 5

Section II Getting Started


Part I How Programs Work II Finding the Right Compiler

7
7 7

Copyright 2008 PH Studios, All Rights Reserved.

Section I
Section Overview
This section will introduce you to C++, what it is, what can it do, and if it is right for you. Advantages and disadvantages will be listed to help you determine if C++ is appropriate for your needs. We will also take a look at the series overview to see what we will cover over the lifespan of the C++ Series.

Part I

Introduction

Welcome to the C++ Text Series! This series will introduce you to C++, get you going with the basics, then allow you to advance to the Windows Programming subseries. You will also have the option to download the video versions of these tutorials; however, what is covered in the text version, will be covered in the video version.

Basic Sub-Series
This sub-series is recommended to beginners or intermediate programmers. The core elements of C++ will be explained, while using console, in detail only in this series. Here is a list of properties for this sub-series: Introduction to C++ Basic to Intermediate C++ Console Applications only

Advanced Sub-Series
This sub-series will pick up where the basic sub-series ends and is recommended to advanced programmers, or to those who finished the basic sub-series. The main change in this series is the main focus will be Windows Programming. Here is a list of properties for this sub-series: Introduction to Windows Programming Advanced C++ Many projects as tutorials.

Which Sub-Series Is Right for You?


C++ can get very complicated and fast. The deeper you will get, the more advanced topics like pointers and classes will be needed. If you are fairly confident that you know these advanced topics, go ahead and choose the advanced sub-series. Keep in mind, the C++ Subscription covers both sub-series. If you have the C++ Subscription and run into some trouble with the advanced stuff, you can get some basic tutorials for no additional cost.
Copyright 2008 PH Studios, All Rights Reserved.

C++ Introduction
C++ is a complex and powerful programming language. While C++ is not as good as assembly in some areas, it is the most common and powerful language most people use. Most computer software are designed in C++ or any of the other C derivatives, and most operating systems are designed in assembly language. So, if you decide to write programs, C++ is the most powerful and best way to do it. The question that arises is if C++ is worth the trouble with what you want to do. If you are fine with losing very little performance for basic applications, I would recommend C# or other easier languages instead. If you need the speed, high demanding game development for example, you should learn C++. Each language has their own advantages and disadvantages, so the decision is ultimately up to you.

Object-Oriented Programming, or OOP


C++ (like most OOP languages) is special in that it supports multiple programming paradigms, including object-oriented and procedural. OOP is a paradigm that organizes your application into objects that interact with one another to accomplish a task. With OOP, you can make classes and objects of classes (known as instances of a class) in your program. Later in the basic sub-series, we will have a look at polymorphism, inheritance, and encapsulation. Procedural simply groups a program into operations that are performed. These terms will be explained in greater detail later.

Part II

Advantages and Disadvantages

While C++ is one of the most powerful languages around, there are certain disadvantages to it over other languages. However, if you get used to C++, the advantages are well worth it. Here is a list of advantages and disadvantages:

Advantages
More User Control Manual Memory Management Incredible Speed Widely Supported

Disadvantages
Requires More Work Pointers and Memory Management Longer Development Time

Copyright 2008 PH Studios, All Rights Reserved.

Keep in mind, these are general and most common advantages and disadvantages. Some might find the disadvantages as an advantage, so it is ultimately up to you to determine if C++ is right for you.

Part III

Series Overview

The C++ Series will include around 25 to 35 tutorials and a few projects. The first 3 tutorials from the basic and first 2 from the advanced series will be free. Here is an overview on what we will cover in this series:

Basic Sub-Series
Tutorial 1: Intro to the series and list of programs Tutorial 2: First program and discussion on cout<< Tutorial 3: Primitive Variables (int, double, float, ...) Tutorial 4: Variables Continued (Constants and Input) Tutorial 5: Enumerations Tutorial 6: Expressions and Precedence Tutorial 7: Statements (if) Tutorial 8: Statements (switch) Tutorial 9: Loops (while) Tutorial 10: Loops (do...while and for) Tutorial 11: Functions I (Introduction) Tutorial 12: Functions II (Overloading) Tutorial 13: Functions III (Recursion) Tutorial 14: Classes I (Introduction) Tutorial 15: Classes II (Polymorphism) Tutorial 16: Classes III (Inheritance) Tutorial 17: Pointers I (Introduction) Tutorial 18: Pointers II (Advanced) Tutorial 19: Arrays Tutorial 20: Headers

Advanced Sub-Series
Tutorial 21: Windows Programming I (Introduction) Tutorial 22: Windows Programming II (Buttons) Tutorial 23: Windows Programming III (Text Box) Tutorial 24: Windows Programming IV (Labels) Tutorial 25: Windows Programming V (Threads) Tutorial 26: Windows Programming VI (BackgroundWorker) Tutorial 27: Windows Programming VII (Menu Strips) Tutorial 28: Windows Programming VIII (Menu Strips Continued) Tutorial 29: Windows Programming IX (ListView)
Copyright 2008 PH Studios, All Rights Reserved.

Tutorial 30: Error Proofing Tutorial 31: Software Development Cycle Tutorial 32: States Project 1: Bank Manager Project 2: Download Manager Project 3: Password Manager Project 4: User Choice

Copyright 2008 PH Studios, All Rights Reserved.

Section II
Section Overview
This section will help you get started with C++ by finding the right programs. To fully understand any programming language, you should know how programs work. We will take a quick look at the workings of a program in this section as well.

Part I

How Programs Work

Programs handle the three basic functions of computers, input, output, and process. Input consists of things like keyboard, mouse, microphone and scanner where output consists of monitor, speaker, and printer. Process branches off into two tasks known as compute and control. Compute has 3 features known as arithmetic (+, -, *, /, %), logical (And, Or, Not), and relational (>, <, ==, !=). Compute branches off into the 4 primary programming logic constructs known as sequence, decision, loop, and unconditional branch. Sequence is just the computer performing your code in sequential order. Sequence is usually performed from top to bottom. Decision consists of the if and switch statements and will execute different parts of the program depending on the boolean value. Loop consists of while and for loop. This part of the compute process does exactly what it says, loops. The last logic construct is unconditional branch which consists of the goto statement. Most programmers do not like the goto statement, so they are not a good idea to use.

Part II

Finding the Right Compiler

Before you get started with C++, you need some applications first. You have 2 choices, either use notepad to write C++ code then use a standalone compiler, or grab an IDE (Interactive Development Environment) which has an editor and compiler built in. I recommend getting an IDE since most of them have code completion. I will only mention 2 IDE that are free and very usable. Links to these IDEs can be found at the end of this tutorial. The first IDE I recommend is Microsoft Visual C++ 2008 Express. VC++ will allow you to use .NET to make your program development time shorter, and allows you to visually create a Windows Application. The other IDE I recommend is Bloodshed Dev-C++ 5. Dev-C++ 5 has been in beta forever, but it runs very well.

Copyright 2008 PH Studios, All Rights Reserved.

Conclusion
The goal of this tutorial was to define C++, discuss its advantages and disadvantages, explain the C++ Series and its sub-series, explain how programs work, and to get you started by choosing an IDE. Since we did not have any coding in this tutorial, I have chosen to give the first 3 of this sub-series for free. Next tutorial we will discuss how to use basic output by displaying stuff to a console window.

Links to IDE
Microsoft Visual C++ 2008 Express - http://www.microsoft.com/express/vc/ Bloodshed Dev-C++ 5 - http://www.bloodshed.net/devcpp.html

Copyright 2008 PH Studios, All Rights Reserved.

Das könnte Ihnen auch gefallen