Introduction to C++ Programming and Graphics

Front Cover
Springer Science & Business Media, Jun 6, 2007 - Computers - 372 pages

C++ has grown rapidly in response to the practical need for a programming language that is able to efficiently handle composite and diverse data types. Today, C++ dominates the commercial market and is favored among application developers.

Introduction to C++ Programming and Graphics offers a venue for rapidly learning the language by concisely revealing its grammar, syntax and main features, and by explaining the key ideas behind object oriented programming (OOP), with emphasis on scientific computing.

The book reviews elemental concepts of computers and computing, describes the primary features of C++, illustrates the use of pointers and user-defined functions, and analyzes the construction of classes. Distinctive features include:

  • An effective selection and presentation of topics and supporting examples

  • A tutorial on the usage of MATLABŪ functions in C++ code

  • Tables for translating MATLABŪ and Fortran 77 into C++ code, illustrating syntactic differences between these languages

  • Chapters on graphics and GUI programming based on the VOGLE library and the GLUT, GLUI and GTK+ utility toolboxes

This invaluable resource provides a basic, concise introduction to C++ for the novice, allowing the reader to easily grasp the necessary concepts, rather than trying to absorb an extensive reference book. Scientists, engineers, professionals and students familiar with the general principles of computer programming and proficient in an easy programming language will find this volume an ideal entry point into C++.

 

What people are saying - Write a review

User Review - Flag as inappropriate

good

Selected pages

Contents

Computers and Computing
1
12 The binary system
3
13 Binary system arithmetic
10
14 Computer memory and addresses
13
15 Computer programming
15
16 Floatingpoint representation
19
17 The hexadecimal system
22
General Features of C++
24
65 The fruit class
161
66 Friends
163
67 Circles and squares
164
68 Algebra on real numbers
167
69 Operator overloading
170
610 Pointers to class members
173
611 The class of points in a plane
175
612 The class of runners
178

22 Grammar and syntax
25
23 Data types
28
24 Vectors arrays and composite data types
34
25 System header files
38
26 Standard namespace
40
27 Compiling in Unix
41
28 Simple codes
44
Programming in C++
47
32 Vector and matrix initialization
51
33 Control structures
53
34 Receiving from the keyboard and displaying on the monitor
59
35 Mathematical library
68
36 Read from a file and write to a file
70
37 Formatted input and output
74
38 Sample algorithms
80
39 Bitwise operators
85
310 Preprocessor define and undefine
88
UserDefined Functions
91
42 Static variables
93
43 Function return
95
44 Functions in individual files and header files
100
45 Functions with scalar arguments
102
46 Functions with array arguments
109
47 External variables
117
48 Function overloading
119
49 Recursive calling
120
410 Function templates
121
Pointers
127
52 Pointers to arrays and strings
134
53 Sorting with the STL
137
54 Command line arguments
140
55 Pointers to functions
142
56 Pointers to free memory
145
Classes and Objects
149
61 Class objects and functions
151
62 Class interfaces
152
63 Class definition
153
64 Private fields public fields and global variables
159
613 Header files and projects
183
614 Inheritance
185
615 Pointers and virtual functions
189
616 Class templates
193
Graphics Programming with VOGLE
197
71 Compilation
198
72 Getting started with Vogle
200
73 Animation
207
74 Plotting a line
215
75 A graph with axes
221
76 Graph animation
231
77 Threedimensional interactive graph
236
78 Threedimensional interactive object drawing
248
Graphics Programming with GLUT GLUI and GTK+
252
82 Graphics events
268
83 Dropdown menus
279
84 GUI programming with GLUI
281
85 GUI programming with GTK+
283
Using Matlab
287
91 Invoking Matlab
288
92 The Matlab engine library
289
93 The Matlab engine functions
290
94 Transferring data to the Matlab domain
294
95 Transferring data from Matlab to the C++ domain
306
Unix Primer
314
Summary of VOGLE Functions
318
C++MatlabFortran 77 Dictionary
325
ASCII Code
337
C++ Keywords
341
Matlab Primer
343
F2 Precision
346
F3 Matlab commands
347
F4 Elementary examples
348
F5 Matlab functions
352
F7 Numerical methods
355
The Standard Template Library
364
Index
366
Copyright

Other editions - View all

Common terms and phrases

Bibliographic information