C++ Tutorials

A Brief History of C++

  • 2007-09-04
  • Comments
  • Jagan
  • 1125

Computer languages have undergone dramatic evolution since the first electronic computers were built to assist in telemetry calculations during World War II. Early on, programmers worked with the most primitive computer instructions: machine language. These instructions were represented by long strings of ones and zeroes. Soon, assemblers were invented to map machine instructions to human-readable and -manageable mnemonics, such as ADD and MOV.
Read More

Difference between Procedural, Structured, and Object-Oriented Programming

  • 2007-09-04
  • Comments
  • Jagan
  • 1128

Until recently, programs were thought of as a series of procedures that acted upon data. A procedure, or function, is a set of specific instructions executed one after the other. The data was quite separate from the procedures, and the trick in programming was to keep track of which functions called which other functions, and what data was changed. To make sense of this potentially confusing situation, structured programming was created.
Read More

C++ and Object-Oriented Programming

  • 2007-09-04
  • Comments
  • Priya
  • 1124

C++ fully supports object-oriented programming, including the four pillars of object-oriented development: encapsulation, data hiding, inheritance, and polymorphism. Encapsulation and Data Hiding When an engineer needs to add a resistor to the device she is creating, she doesn't typically build a new one from scratch. She walks over to a bin of resistors, examines the colored bands that indicate the properties, and picks the one she needs. The resistor is a "black box" as far as the engineer is concerned--she doesn't much care how it does its work as long as it conforms to her specifications; she doesn't need to look inside the box to use it in her design.
Read More

Getting Started with C++

  • 2007-09-04
  • Comments
  • Priya
  • 1125

The question inevitably arises: "Since C++ is a superset of C, should I learn C first?" Stroustrup and most other C++ programmers agree. Not only is it unnecessary to learn C first, it may be advantageous not to do so.
Read More

Using Comments in a C++ Program

  • 2007-09-04
  • Comments
  • Priya
  • 1129

When you are writing a program, it is always clear and self-evident what you are trying to do. Funny thing, though--a month later, when you return to the program, it can be quite confusing and unclear. I'm not sure how that confusion creeps into your program, but it always does.
Read More

Using functions in C++

  • 2007-09-04
  • Comments
  • Emiley J
  • 1125

While main() is a function, it is an unusual one. Typical functions are called, or invoked, during the course of your program. A program is executed line by line in the order it appears in your source code, until a function is reached. Then the program branches off to execute the function. When the function finishes, it returns control to the line of code immediately following the call to the function.
Read More

The if Statement in C++

  • 2007-09-04
  • Comments
  • Priya
  • 1125

Normally, your program flows along line by line in the order in which it appears in your source code. The if statement enables you to test for a condition (such as whether two variables are equal) and branch to different parts of your code, depending on the result.
Read More

How to handle Exceptions in C++

  • 2007-09-17
  • Comments
  • Lakshmi
  • 1126

In C++, an exception is an object that is passed from the area of code where a problem occurs to the part of the code that is going to handle the problem. The type of the exception determines which area of code will handle the problem, and the contents of the object thrown, if any, may be used to provide feedback to the user.
Read More

Most Viewed Articles on C++

Latest Tutorials

Ask a Question

Subscribe to Tutorials

Related Tutorials

Calculating total based on the given quantity and price in C++

Sorting an array of Strings in C++

Matrix using nested for loops in C++

Compute the square root of the sum of the squares of an array in C++

Calculate average using Two-Dimensional Array in C++

Two-Dimensional Array Manipulation in C++

Compiling and Linking Multiple Source Files in C++

Enumerations in C++

typedef in C++

Declarations and Definitions in C++

Uninitialized Variables Cause Run-Time Problems in C++

C++ keywords

Lvalues and Rvalues in C++

Multi-Line Literals in C++

Concatenated String Literals in C++

Archived Comments

1. finally i got it !!! thanks a lot!!! you really he
View Tutorial          By: maher at 2010-11-11 02:44:07

2. thank you very much
finally i understood th

View Tutorial          By: Marina at 2009-11-29 14:17:43

3. plz send inheritance concept,how to use final,thi
View Tutorial          By: sobha at 2010-02-14 08:29:33

4. Hello,
I am not getting any output.

View Tutorial          By: Niket DOshi at 2015-05-01 03:03:49

5. Mail me Codings in java of different programs
View Tutorial          By: vikram at 2008-09-12 06:04:42

6. i want some more info to make my final project.
View Tutorial          By: Arshid saeed at 2010-02-18 08:18:45

7. I have modified this example a bit and I'm using a
View Tutorial          By: Lee Murray at 2010-11-02 03:41:56

8. Explanation was good and easily comprehendable.
View Tutorial          By: Moin Adil at 2009-06-17 04:18:56

9. Hi,

I think this is not a correct d

View Tutorial          By: Dinesh Chopra dc at 2013-03-19 04:30:48

10. @pankaj because u need to cast it. when u add num
View Tutorial          By: raziq at 2011-12-18 16:06:09