Introduction to C++ Programming and Graphics
Author: Constantine Pozrikidis
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[Registered] functions in C++ code, Tables for translating MATLAB[Registered] 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++.
Table of Contents:
Computers and Computing 1Hardware and software 1
The binary system 3
Binary system arithmetic 10
Computer memory and addresses 13
Computer programming 15
Floating-point representation 19
The hexadecimal system 22
General Features of C++ 24
The main function 24
Grammar and syntax 25
Data types 28
Vectors, arrays, and composite data types 34
System header files 38
Standard namespace 40
Compiling in Unix 41
Simple codes 44
Programming in C++ 47
Operators 47
Vector and matrix initialization 51
Control structures 53
Receiving from the keyboard and displaying on the monitor 59
Mathematical library 68
Read from a file and write to a file 70
Formatted input and output 74
Sample algorithms 80
Bitwise operators 85
Preprocessor define and undefine 88
User-Defined Functions 91
Functionsin the main file 91
Static variables 93
Function return 95
Functions in individual files and header files 100
Functions with scalar arguments 102
Functions with array arguments 109
External variables 117
Function overloading 119
Recursive calling 120
Function templates 121
Pointers 127
Pointers to scalars and characters 127
Pointers to arrays and strings 134
Sorting with the STL 137
Command line arguments 140
Pointers to functions 142
Pointers to free memory 145
Classes and Objects 149
Class objects and functions 151
Class interfaces 152
Class definition 153
Private fields, public fields, and global variables 159
The fruit class 161
Friends 163
Circles and squares 164
Algebra on real numbers 167
Operator overloading 170
Pointers to class members 173
The class of points in a plane 175
The class of runners 178
Header files and projects 183
Inheritance 185
Pointers and virtual functions 189
Class templates 193
Graphics Programming with VOGLE 197
Compilation 198
Getting started with VOGLE 200
Animation 207
Plotting a line 215
A graph with axes 221
Graph animation 231
Three-dimensional interactive graph 236
Three-dimensional interactive object drawing 248
Graphics Programming with GLUT, GLUI, and GTK+ 252
GLUT 252
Graphics events 268
Drop-down menus 279
GUI programming with GLUI 281
GUI programming with GTK+ 283
Using Matlab 287
Invoking Matlab 288
The Matlab engine library 289
The Matlab engine functions 290
Transferring data to the Matlab domain 294
Transferring data from Matlab to the C++ domain 306
Unix Primer 314
Summary of VOGLE Functions 318
C++/Matlab/Fortran 77 Dictionary 325
ASCII Code 337
C++ Keywords 341
Matlab Primer 343
Grammar and syntax 343
Precision 346
Matlab commands 347
Elementary examples 348
Matlab functions 352
User-defined functions 352
Numerical methods 355
Matlab graphics 355
The Standard Template Library 364
Index 367
Read also Principes Fondamentaux de Gouvernement de Politique
Understanding Sructures: An Introduction to Structural Analysis
Author: Mete A Sozen
Presenting a relaxed approach to learning, Understanding Structures provides a basic understanding of how building or bridges resist gravity, wind, or earthquake loads; such understanding is essential for the design and construction of safe structures. This interactive textbook features companion GOYA software, developed by the authors and designed to improve intuitive understanding of structures through repetition, allowing students to solve problems of increasingly complexity with relative ease. Ideal for self-study, the book presents numerous examples, case studies, solved problems, and a separate solutions manual. The text covers such topics as trusses, bending, frames, buckling, and more.
0 comments:
Post a Comment