Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,413 members, 7,808,472 topics. Date: Thursday, 25 April 2024 at 12:28 PM

C++ Mystified: A Self Teaching Guide By Jeff Kent - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / C++ Mystified: A Self Teaching Guide By Jeff Kent (1697 Views)

France To Enforce Basic Programming Teaching Starting At Age 10 / A Teaching GIG For ROR Developers And Web Developers / Teaching Software Engineering In Four Months? (2) (3) (4)

(1) (Reply) (Go Down)

C++ Mystified: A Self Teaching Guide By Jeff Kent by Ceekay(m): 12:46pm On Mar 25, 2010
Please my dear nairaland programmers,
I am in dire need of the book c++ mystified: a self teaching guide by jeff kent
please can anyone help me with the download link to the pdf or chm file
I've been searching for ages, but without success

I would be very grateful!!!
OR conversely i need a site where i can download c++ pdf books free
Thanks

Please dont leave me hanging
Help a Broda
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by Ceekay(m): 1:50pm On Mar 26, 2010
Eyah why now?
ITs been more than 24hrs and not one single reply. .
Very dissapointed sad
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by candylips(m): 3:06pm On Mar 26, 2010
You might be able to get a torrent of the pdf. just do a search for it in google
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by ncpat(m): 5:13pm On Mar 26, 2010
Ceekay:

Please my dear nairaland programmers,
I am in dire need of the book c++ mystified: a self teaching guide by jeff kent
please can anyone help me with the download link to the pdf or chm file
I've been searching for ages, but without success

I would be very grateful!!!
OR conversely i need a site where i can download c++ pdf books free
Thanks

Please dont leave me hanging
Help a Broda

i have already done the home work for you by spending my all time on the net trying to help so if you need this E-BOOK BY JEFF KENT, it will cost you only #2,000 (two thousand naira only) call me on 08065942445 or mail chuksman2000@yahoo.com

below is the preview

Table of Contents

Introduction
Chapter 1 - How a C++ Program Works
Chapter 2 - Memory and Data Types
Chapter 3 - Variables
Chapter 4 - Arithmetic Operators
Chapter 5 - Making Decisions: if and switch Statements
Chapter 6 - Nested if Statements and Logical Operators
Chapter 7 - The For Loop
Chapter 8 - While and Do While Loops
Chapter 9 - Functions
Chapter 10 - Arrays
Chapter 11 - What’s the Address? Pointers
Chapter 12 - Character, C-String, and C++ String Class Functions
Chapter 13 - Persistent Data: File Input and Output
Chapter 14 - The Road Ahead: Structures and Classes
Final Exam
Answers to Quizzes and Final Exam
Index
List of Figures
List of Tables


Chapter 1: How a C++ Program Works[/b]

[b]Overview


You probably interact with computer programs many times during an average day. When you arrive at work and find out your computer doesn’t work, you call tech support. At the other end of the telephone line, a computer program forces you to navigate a voicemail menu maze and then tortures you while you are on perpetual hold with repeated insincere messages about how important your call is, along with false promises about how soon you will get through.

When you’re finally done with tech support, you decide to take a break and log on to your now-working computer to do battle with giant alien insects from the planet Megazoid. Unfortunately, the network administrator catches you goofing off using yet another computer program which monitors employee computer usage. Assuming you are still employed, an accounts payable program then generates your payroll check.

On your way home, you decide you need some cash and stop at an ATM, where a computer program confirms (hopefully) you have enough money in your bank account and then instructs the machine to dispense the requested cash and (unfortunately) deducts that same amount from your account.

Most people, when they interact with computers as part of their daily routine, don’t need to consider what a computer program is or how it works. However, a computer programmer should know the answers to these and related questions, such as what is a programming language, and how does a C++ program actually work? When you have completed this chapter, you will know the answers to these questions, and also understand how to create and run your own computer program
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by ncpat(m): 6:06pm On Mar 26, 2010
Ceekay:

Please my dear nairaland programmers,
I am in dire need of the book c++ mystified: a self teaching guide by jeff kent
please can anyone help me with the download link to the pdf or chm file
I've been searching for ages, but without success

I would be very grateful!!!
OR conversely i need a site where i can download c++ pdf books free
Thanks

Please dont leave me hanging
Help a Broda

i have already done the home work for you by spending my all time on the net trying to help so if you need this E-BOOK BY JEFF KENT, it will cost you only #2,000 (two thousand naira only) call me on 08065942445 or mail chuksman2000@yahoo.com

below is the preview

Table of Contents

Introduction
Chapter 1 - How a C++ Program Works
Chapter 2 - Memory and Data Types
Chapter 3 - Variables
Chapter 4 - Arithmetic Operators
Chapter 5 - Making Decisions: if and switch Statements
Chapter 6 - Nested if Statements and Logical Operators
Chapter 7 - The For Loop
Chapter 8 - While and Do While Loops
Chapter 9 - Functions
Chapter 10 - Arrays
Chapter 11 - What’s the Address? Pointers
Chapter 12 - Character, C-String, and C++ String Class Functions
Chapter 13 - Persistent Data: File Input and Output
Chapter 14 - The Road Ahead: Structures and Classes
Final Exam
Answers to Quizzes and Final Exam
Index
List of Figures
List of Tables


Chapter 1: How a C++ Program Works[/b]

[b]Overview


You probably interact with computer programs many times during an average day. When you arrive at work and find out your computer doesn’t work, you call tech support. At the other end of the telephone line, a computer program forces you to navigate a voicemail menu maze and then tortures you while you are on perpetual hold with repeated insincere messages about how important your call is, along with false promises about how soon you will get through.

When you’re finally done with tech support, you decide to take a break and log on to your now-working computer to do battle with giant alien insects from the planet Megazoid. Unfortunately, the network administrator catches you goofing off using yet another computer program which monitors employee computer usage. Assuming you are still employed, an accounts payable program then generates your payroll check.

On your way home, you decide you need some cash and stop at an ATM, where a computer program confirms (hopefully) you have enough money in your bank account and then instructs the machine to dispense the requested cash and (unfortunately) deducts that same amount from your account.

Most people, when they interact with computers as part of their daily routine, don’t need to consider what a computer program is or how it works. However, a computer programmer should know the answers to these and related questions, such as what is a programming language, and how does a C++ program actually work? When you have completed this chapter, you will know the answers to these questions, and also understand how to create and run your own computer program
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by iGuru1(m): 7:28pm On Mar 26, 2010
At last 2 reply's. grin
You are too lazy, any small thing "Nlander's help" abi if u dey chop the money u go say "Nlander's come chop ooh"
Learn how to use google to get what u want.
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by ncpat(m): 2:00am On Mar 27, 2010
call me on 08065942445 to get what u ask for, below is the preview

Table of Contents

Introduction
Chapter 1 - How a C++ Program Works
Chapter 2 - Memory and Data Types
Chapter 3 - Variables
Chapter 4 - Arithmetic Operators
Chapter 5 - Making Decisions: if and switch Statements
Chapter 6 - Nested if Statements and Logical Operators
Chapter 7 - The For Loop
Chapter 8 - While and Do While Loops
Chapter 9 - Functions
Chapter 10 - Arrays
Chapter 11 - What’s the Address? Pointers
Chapter 12 - Character, C-String, and C++ String Class Functions
Chapter 13 - Persistent Data: File Input and Output
Chapter 14 - The Road Ahead: Structures and Classes
Final Exam
Answers to Quizzes and Final Exam
Index
List of Figures
List of Tables

call me if u are interested on 08065942445 or mail chuksman2000@yahoo.com
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by complus: 2:42am On Mar 27, 2010
Ceekay:

Please my dear nairaland programmers,
I am in dire need of the book c++ mystified: a self teaching guide by jeff kent
please can anyone help me with the download link to the pdf or chm file
I've been searching for ages, but without success

I would be very grateful!!!
OR conversely i need a site where i can download c++ pdf books free
Thanks

Please dont leave me hanging
Help a Broda

below is a preview of what u are looking for

Table of Contents

Introduction
Chapter 1 - How a C++ Program Works
Chapter 2 - Memory and Data Types
Chapter 3 - Variables
Chapter 4 - Arithmetic Operators
Chapter 5 - Making Decisions: if and switch Statements
Chapter 6 - Nested if Statements and Logical Operators
Chapter 7 - The For Loop
Chapter 8 - While and Do While Loops
Chapter 9 - Functions
Chapter 10 - Arrays
Chapter 11 - What’s the Address? Pointers
Chapter 12 - Character, C-String, and C++ String Class Functions
Chapter 13 - Persistent Data: File Input and Output
Chapter 14 - The Road Ahead: Structures and Classes
Final Exam
Answers to Quizzes and Final Exam
Index
List of Figures
List of Tables
Anatomy of a C++ Program
It seems to be a tradition in C++ programming books for the first code example to output to a console window the message “Hello World!” (shown in Figure 1-1).


Figure 1-1: C++ program outputting “Hello World!” to the screen

Note The term “console” goes back to the days before Windows when the screen did not have menus and toolbars but just text. If you have typed commands using DOS or UNIX, you likely did so in a console window. The text “Press any key to continue” immediately following “Hello World!” is not part of the program, but instead is a cue for how to close the console window.


Unfortunately, all too often the “Hello World!” example is followed quickly by many other program examples without the book or teacher first stopping to explain how the “Hello World!” program works. The result soon is a confused reader or student who’s ready to say “Goodbye, Cruel World.”

While the “Hello World!” program looks simple, there actually is a lot going on behind the scenes of this program. Accordingly, we are going to go through the following code for the “Hello World!” program line by line, though not in top-to-bottom order.

#include <iostream>
using namespace std;

int main(void)
{
cout << "Hello World!";
return 0;
}
Note The code a programmer writes is referred to as source code, which is saved in a file that usually has a .cpp extension, standing for C++.


The main Function
As discussed in the “What Is a Programming Language?” section, the purpose of C++, or any programming language, is to enable a programmer to write instructions for a computer. Often, a task is too complex for just one instruction. Instead, several related instructions are required.

A function is a group of related instructions, also called statements, which together perform a particular task. The name of the function is how you refer to these related statements. In the “Hello World!” program, main is the name of a function. A program may have many functions, and in Chapter 9 I will show you how to create and use functions. However, a program must have one main function, and only one main function. The reason is that the main function is the starting point for every C++ program. If there was no main function, the computer would not know where to start the program. If there was more than one main function, the program would not know whether to start at one or the other.

Note The main function is preceded by int and followed by void in parentheses. We will cover the meaning of both in Chapter 9.


The Function Body
Each of the related instructions, or statements, which belong to the main function are contained within the body of that function. A function body starts with a left curly brace, {, and ends with a right curly brace, }.

Each statement usually ends with a semicolon. The main function has two statements:

cout << "Hello World!";
return 0;
Statements are executed in order, from top to bottom. Don’t worry, the term “executed” doesn’t mean the statement is put to death. Rather, it means that the statement is carried out, or executed, by the computer.

cout
The first statement is

cout << "Hello World!";
cout is pronounced “C-out.” The “out” refers to the direction in which cout sends a stream of data.

A data stream may flow in one of two directions. One direction is input—into your program from an outside source such as a file or user keyboard input. The other direction is output—out from your program to an outside source such as a monitor, printer, or file.

cout concerns the output stream. It sends information to the standard output device. The standard output device usually is your monitor, though it can be something else, such as a printer or a file on your hard drive.

The << following cout is an operator. You likely have used operators before, such as the arithmetic operators +, –, *, and /, for addition, subtraction, multiplication, and division, respectively.

The << operator is known as the stream insertion operator. It inserts the information immediately to its right—in this example, the text “Hello World!” into the data stream. The cout object then sends that information to the standard output device—in this case, the monitor.

Note In Chapter 3, you will learn about the counterparts to the cout object and the << operator, the cin object, which concerns the input stream, and the >> operator used with the cin object.


The return 0 Statement
The second and final statement returns a value of zero to the computer’s operating system, whether Windows, UNIX, or another. This tells the operating system that the program ended normally. Sometimes programs do not end normally, but instead crash, such as if you run out of memory during the running of the program. The operating system may need to handle this abnormal program termination differently than normal termination. That is why the program tells the operating system that this time it ended normally.

The #include Directive
Your C++ program “knows” to start at the main function because the main function is part of the core of the C++ language. We certainly did not write any code that told the C++ program to start at main.

Similarly, your C++ program seems to know that the cout object, in conjunction with the stream insertion operator <<, outputs information to the monitor. We did not write any code to have the cout object and the << operator achieve this result.

However, the cout object is not part of the C++ core language. Rather, it is defined elsewhere, in a standard library file. C++ has a number of standard library files, each defining commonly used objects. Outputting information to the monitor certainly is a common task. While you could go to the trouble of writing your own function that outputs information to the screen, a standard library file’s implementation of cout saves you the trouble of “reinventing the wheel.”

While C++ already has implemented the cout object for you in a standard library file, you still have to tell the program to include that standard library file in your application. You do so with the #include directive, followed by the name of the library file. If the library file is a standard library file, as opposed to one you wrote (yes, you can create your own), then the file name is enclosed in angle brackets, < and >.

The cout object is defined in the standard library file iostream. The “io” in iostream refers to input and output—“stream” to a stream of data. To use the cout object, we need to include the iostream standard library file in our application. We do so with the following include directive:

#include <iostream>
The include directive is called a preprocessor directive. The preprocessor, together with the compiler and linker, are discussed later in this chapter in the section “Translating the Code for the Computer.” The preprocessor directive, unlike statements, is not ended by a semicolon.

Namespace
The final statement to be discussed in the Hello World! example is

using namespace std;
C++ uses namespaces to organize different names used in programs. Every name used in the iostream standard library file is part of a namespace called std. Consequently, the cout object is really called std::cout. The using namespace std statement avoids the need for putting std:: before every reference to cout, so we can just use cout in our code.

call me on 08065942445
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by Ceekay(m): 9:00pm On Mar 27, 2010
What is the meaning of all this nonsense now?
I'm seeing 7 replies but only 3 are shown here
If its the spambot, abeg release the posts now lemme know if its what i want
what kind of frustration is this?

i-Guru:

At last 2 reply's. grin
You are too lazy, any small thing "Nlander's help" abi if u dey chop the money u go say "Nlander's come chop ooh"
Learn how to use google to get what u want.

IF you cant help me just shut up and stop embarrassing yourself
After all no one beats you when it comes to asking for help about one programming material or the other
nonsense
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by iGuru1(m): 10:59pm On Mar 27, 2010
Ceekay:

What is the meaning of all this nonsense now?
I'm seeing 7 replies but only 3 are shown here
If its the spambot, abeg release the posts now lemme know if its what i want
what kind of frustration is this?

IF you cant help me just shut up and stop embarrassing yourself
After all no one beats you when it comes to asking for help about one programming material or the other
nonsense
like i said you're just being too lazy.
Nairaland don spoil you. As for me, i only ask for tips not help.
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by Ceekay(m): 6:51pm On Mar 28, 2010
i-Guru:

like i said you're just being too lazy.
Nairaland don spoil you. As for me, i only ask for tips not help.

Typical nigerian,
Like i said quit being a fool and stop embarrasing yourself
Look at some of your numerous threads below where you're begging like a baby
Some of them you start them multiple times, then you come here to talk like a brainless fagg.ot

Python

Algorithm

Komodo 5.0


Better not start another thread, because after this behaviour, no one would like to help you.
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by candylips(m): 10:48am On Mar 29, 2010
lol
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by Ceekay(m): 8:22pm On Apr 02, 2010
Nairaland Programming Section IS a[b] HUGE JOKE[/b]!. . . sad
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by Seun(m): 3:39pm On Apr 03, 2010
The post has been made visible.
Re: C++ Mystified: A Self Teaching Guide By Jeff Kent by candylips(m): 1:26pm On Apr 09, 2010
@topic

Try to get Thinking in C++ by Bruce eckel as well . . fantastic book

(1) (Reply)

Javame SDK, Netbeans IDE, SVG Tiny Problems / Who And Know Who Is The Youngest Programmer Here / Goodnews ' Opera Mini' Now Animated Flash,java Script, .gif, Slides Contents

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 44
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.