C++ Compilers (GNU and Visual Studio)

A compiler is a program that translates one language (high level) into another language (e.g., assembly language or machine specific language). A compiler translates source code (plain text) into object code (normally in a form suitable for processing by other programs (like a linker)). The most common reason for wanting to translate source code is to create an executable program. More »


Posted in C++ Tutorials | Comments Off on C++ Compilers (GNU and Visual Studio)


History of the C++ language

In this first C++ programming language tutorial we are going to look at the history of the C++ language.

The C programming language was devised in the early 1970s by Dennis M. Ritchie an employee from Bell Labs (AT&T). (To view a brief history of the C language; click here).

Many other programming languages are derived from the C language. Some did well and some did not. The languages Objective-C and C++ for instance are derived from the C language.  Both languages add the “object oriented” element to the language C. One of the most recent languages, that used much of the C language, is Java. More »


Posted in C++ Tutorials | Comments Off on History of the C++ language


C Reference function clock()

Usage of clock():

clock_t clock ( void );

Parameters:

None.

Return Value:

The number of clock ticks elapsed since the program start. If the function fails then it will return a value of -1. The clock_t type is defined in ctime.h.

Explanation:

The function returns the number of clock ticks elapsed since the start of the program. More »


Posted in C Reference time.h Functions | 2 Comments


C Reference function difftime()

Usage of difftime():

double difftime ( time_t time2, time_t time1 );

Parameters:

Time1 and time2 are both time_t objects.

Return Value:

The difference in seconds between time2-time1 will be returned as a floating point double.

Explanation:

Calculates the difference in seconds between time1 and time2. More »


Posted in C Reference time.h Functions | 1 Comment


C Reference macro NULL

The null pointer macro (NULL) is generally used to signify that a pointer does not point to an object.


Posted in C Reference time.h Functions | Comments Off on C Reference macro NULL


C Reference function mktime()

Usage of mktime():

time_t mktime ( struct tm * ptr_time );

Parameters:

The pointer ptr_time points to a tm structure that contains a calendar time, which in turn is broken down into its components.

Return Value:

A time_t value corresponding to the calendar time passed as argument.
If an error occurs then the function mktime() returns a -1 value. More »


Posted in C Reference time.h Functions | Comments Off on C Reference function mktime()


C Reference function time()

Usage of time():

time_t time ( time_t * ptr_time );

Parameters:

ptr_time is a pointer to an object of type time_t. In this object the time value is stored.

It is also allowed to fill in a null pointer, but the a time_t object is still returned by the function time().

Return Value:

The current calendar time as a time_t object. More »


Posted in C Reference time.h Functions | Comments Off on C Reference function time()


(ANSI) C Reference – Control the Flow

A look at with which commands you can alter the flow of a C program.

You could also take a look at the C If – Switch statement tutorial.
You could also take a look at the C Loops tutorial. More »


Posted in Control the Flow of a Program | Comments Off on (ANSI) C Reference – Control the Flow


(ANSI) C Reference – C Operators

A look at the ANSI C operators and their meaning. More »


Posted in C Operators | Comments Off on (ANSI) C Reference – C Operators


(ANSI) C Reference – C Constants

The constants that can be used in the C programing language. More »


Posted in C Constants | Comments Off on (ANSI) C Reference – C Constants