C++ Crash Course: a fast-Paced Introduction



Yüklə 7 Mb.
Pdf görüntüsü
səhifə62/71
tarix20.09.2023
ölçüsü7 Mb.
#145939
1   ...   58   59   60   61   62   63   64   65   ...   71
C Crash Course A Fast-Paced Introduction by Josh Lospinoso

FURTHER RE ADING
• 
The Pragmatic Programmer: From Journeyman to Master
by Andrew Hunt 
and David Thomas (Addison-Wesley Professional, 2000)
• 
The Art of Debugging with GDB, DDD, and Eclipse
by Norman Matloff 
and Peter Jay Salzman (No Starch Press, 2008)
• 
PGP & GPG: Email for the Practical Paranoid
by Michael W. Lucas (No 
Starch Press, 2006)
• 
The GNU Make Book
by John Graham-Cumming (No Starch Press, 2015)



2
T Y P E S
As discussed in Chapter 1, a type declares 
how an object will be interpreted and used by 
the compiler. Every object in a C++ program 
has a type. This chapter begins with a thorough 
discussion of fundamental types and then introduces 
user-defined types. Along the way, you’ll learn about 
several control flow structures.
Fundamental Types
Fundamental types are the most basic types of object and include integer
floating-point, character, Boolean, 
byte

size_t
, and 
void
. Some refer to fun-
damental types as primitive or built-in types because they’re part of the core 
language and almost always available to you. These types will work on any 
platform, but their features, such as size and memory layout, depend on 
implementation.
Hardin once said, “To succeed, planning alone is 
insufficient. One must improvise as well.” I’ll improvise. 
—Isaac Asimov, Foundation


32
Chapter 2
Fundamental types strike a balance. On one hand, they try to map a 
direct relationship from C++ construct to computer hardware; on the other 
hand, they simplify writing cross-platform code by allowing a programmer 
to write code once that works on many platforms. The sections that follow 
provide additional detail about these fundamental types.

Yüklə 7 Mb.

Dostları ilə paylaş:
1   ...   58   59   60   61   62   63   64   65   ...   71




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin