
lafore_robert_objectoriented_programming_in_c
.pdf

856 |
Appendix A |
|
TABLE A.1 Continued
DEC |
HEX |
Symbol |
Key |
Use in C |
192 |
C0 |
¿ |
Alt 192 |
|
193 |
C1 |
¡ |
Alt 193 |
|
194 |
C2 |
¬ |
Alt 194 |
|
195 |
C3 |
√ |
Alt 195 |
|
196 |
C4 |
ƒ |
Alt 196 |
|
197 |
C5 |
≈ |
Alt 197 |
|
198 |
C6 |
∆ |
Alt 198 |
|
199 |
C7 |
« |
Alt 199 |
|
200 |
C8 |
» |
Alt 200 |
|
201 |
C9 |
… |
Alt 201 |
|
202 |
CA |
g |
Alt 202 |
|
203 |
CB |
À |
Alt 203 |
|
204 |
CC |
à |
Alt 204 |
|
205 |
CD |
Õ |
Alt 205 |
|
206 |
CE |
Œ |
Alt 206 |
|
207 |
CF |
œ |
Alt 207 |
|
208 |
D0 |
– |
Alt 208 |
|
209 |
D1 |
— |
Alt 209 |
|
210 |
D2 |
“ |
Alt 210 |
|
211 |
D3 |
” |
Alt 211 |
|
212 |
D4 |
¿ |
Alt 212 |
|
213 |
D5 |
” |
Alt 213 |
|
214 |
D6 |
÷ |
Alt 214 |
|
215 |
D7 |
◊ |
Alt 215 |
|
216 |
D8 |
ÿ |
Alt 216 |
|
217 |
D9 |
Ÿ |
Alt 217 |
|
218 |
DA |
⁄ |
Alt 218 |
|
219 |
DB |
¤ |
Alt 219 |
|
220 |
DC |
‹ |
Alt 220 |
|
221 |
DD |
› |
Alt 221 |
|
222 |
DE |
fi |
Alt 222 |
|
223 |
DF |
fl |
Alt 223 |
|


Appendix A
858
Those key sequences consisting of “Ctrl” are typed by pressing the Ctrl key, and while it is being held down, pressing the key indicated. These sequences are based on those defined for PC Personal Computer series keyboards. The key sequences may be defined differently on other keyboards.
IBM Extended ASCII characters can be displayed by pressing the Alt key and then typing the decimal code of the character on the keypad.

C++ Precedence Table |
A PPENDI X |
and Keywords |
B |
|

Appendix B
860
Precedence Table
This precedence table is a more complete version of the one shown in Chapter 3. It includes the bitwise operators, which, although they are not described as such in this book, can be overloaded, as << and >> are for stream input and output.
Operator type |
Operators |
Scope |
:: |
Various |
[], (), . (dot), ->, postfix ++ and -- |
Unary |
prefix ++ and --, &, *, +, -, ! |
Arithmetic |
Multiplicative *, /, % |
|
Additive +, - |
Bitwise shifts |
<<, >> |
Relational |
Inequality <, >, <=, >= |
|
Equality ==, != |
Bitwise logic |
&, ^, | |
Logical |
&&, || |
Conditional |
?: |
Assignment |
=, *=, /=, %=, +=, -= |
|
<<=, >>=, &=, ^=, |= |
Sequence |
, (comma) |
Keywords
Keywords implement specific C++ language features. They cannot be used as names for variables or other user-defined program elements. Many of the keywords are common to both C and C++, while others are specific to C++. Some compilers may support additional keywords, which usually begin with one or two underscores, as in _cdecl or __int16.
asm auto
bool break
case catch char class const
const_cast continue


Appendix B
862
throw true try typedef typeid
typename
union unsigned using
virtual void volatile
wchar_t while


Appendix C
864
This appendix tells you how to use Microsoft Visual C++ (MVC++) to create console-mode applications, which are the kind of applications used in this book. This discussion is based on MVC++ version 6.0.
The present version of MVC++ has good (although not perfect) adherence to Standard C++. It comes in various versions, including a student version for under $100.
We’ll assume that MVC++ is installed in your system, and that you know how to start it by using the Windows Start button and navigating to the appropriate menu item.
You’ll want to make sure you can see file extensions (like .CPP) when operating MVC++. In Windows Explorer, make sure that the option Hide MS-DOS File Extensions for File Types That Are Registered is not checked.
Screen Elements
The MVC++ window is initially divided into three parts. On the left is the view pane. This has two tabs, ClassView and FileView. Once you have a project going, the ClassView tab will show you the class hierarchy of your program, and FileView will show you the files used in the project. You can click the plus signs to expand the hierarchies, and double-click a file you want to open.
The largest part of the screen usually holds a document window. It can be used for various purposes, including displaying your source files and the contents of help files. At the bottom of the screen is a long window with more tabs: Build, Debug, and so on. This will display messages when you perform operations such as compiling your program.
Single-File Programs
It’s easy to build and execute a single-file console program using Microsoft Visual C++. There are two possibilities: the file already exists or the file needs to be written.
In either case you should begin by making sure that no project is currently open. (We’ll discuss projects in a moment.) Click the File menu. If the Close Workspace item is active (not grayed) click it to close the current workspace.
Building an Existing File
If the .CPP source file already exists, as it does for the example programs in this book, select Open from the File menu. (Note that this is not the same as Open Workspace.) Use the Open dialog box to navigate to the appropriate file, select it, and click the Open button. The file will appear in the document window. (If you’re compiling an example program that uses Console Graphics Lite, such as the CIRCSTRC program in Chapter 5, “Functions,” or the CIRCLES program in Chapter 6, “Objects and Classes,” turn to the section “Building Console Graphics Lite Programs.”)