Gillius's Programming

C and C++ Tutorial Page

This tutorial requires some understanding of programming logic in order to follow it. It is meant for programmers making the transition from BASIC or Pascal to C or C++. In the beginning both C and C++ differences are covered, even though there are very few differences outside of input and output. Study your language choice in depth but at least scan the info on the other so you can read it. But if you are easily confused in this area, just skip over a certain section. I will admit now I heavily bias C++ and use mostly C++ commands after teaching the basic C commands. If you are learning C, converting programs will only require a few easy changes.

Note: When I refer to "C" by itself, I mean collectively both C/C++ at the same time.

All of the information here is for programming under a console environment. It is really much easier to start in console programming than starting with Windows programming, where a simple program requires 50 or so lines and good understanding just to get started. So if you run your compiler, make sure to compile to a DOS or Win32 console target.

Back to tutorials page

Table of Contents

File I

The Main Function I
Comments
Output I
Variables I
Output II
Variables II and Decisions
Input I

File II

Decisions II
Functions I
The Main Function II
Loops I
Decisions III
Arrays I
Variables III (Strings)

File III

Input and Output with Strings
Functions II
Structures I
A note on OOP
Constants (Variables IV)
Number Systems
Pointers
Dynamic Memory Allocation

Charts

Variable Capacities
Debugging Pointers

Back to tutorials page