12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

vi <strong>Teach</strong> <strong>Yourself</strong> <strong>C++</strong>Builder <strong>in</strong> <strong>14</strong> <strong>Days</strong><br />

Contents<br />

Introduction xii<br />

Week 1 at a Glance 1<br />

Day 1 Gett<strong>in</strong>g Your Feet Wet 3<br />

What Is <strong>C++</strong>Builder? .................................................................................. 4<br />

A Quick Look at the <strong>C++</strong>Builder IDE ........................................................ 4<br />

Hello World ............................................................................................... 6<br />

Hello World, Part II—A W<strong>in</strong>32 Console Application ................................ 8<br />

<strong>C++</strong> Language Overview........................................................................... <strong>14</strong><br />

Summary .................................................................................................. 35<br />

Workshop................................................................................................. 36<br />

Day 2 Wad<strong>in</strong>g In Deeper 39<br />

If… .......................................................................................................... 40<br />

Thrown for a Loop ................................................................................... 44<br />

The switch Statement ............................................................................. 51<br />

Learn<strong>in</strong>g About Scope .............................................................................. 53<br />

Structures ................................................................................................. 56<br />

Summary .................................................................................................. 64<br />

Workshop................................................................................................. 65<br />

Day 3 Up to Your Neck <strong>in</strong> <strong>C++</strong> 67<br />

Po<strong>in</strong>ters: Welcome to My Nightmare ....................................................... 68<br />

References ................................................................................................ 76<br />

Pass<strong>in</strong>g Function Parameters by Reference and by Po<strong>in</strong>ter ........................ 79<br />

The new and delete Operators ................................................................ 81<br />

Functions <strong>in</strong> <strong>C++</strong> ..................................................................................... 86<br />

Summary .................................................................................................. 92<br />

Workshop................................................................................................. 92<br />

Day 4 Totally Immersed: <strong>C++</strong> Classes and<br />

Object-Oriented Programm<strong>in</strong>g 95<br />

So, uh…What’s a Class? ........................................................................... 96<br />

Anatomy of a Class ................................................................................... 97<br />

Inheritance ............................................................................................. 116<br />

Basic File I/O ......................................................................................... 122<br />

Summary ................................................................................................ 128<br />

Workshop............................................................................................... 129<br />

Day 5 <strong>C++</strong> Class Frameworks and the Visual Component Model 131<br />

Frameworks 101 ..................................................................................... 132<br />

The <strong>C++</strong> Framework Wars ..................................................................... 136<br />

The Visual Component Library: The New Kid on the Block .................. 139<br />

<strong>C++</strong>Builder and VCL ............................................................................. 153

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!