From the course: C++ Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Primitive arrays - C++ Tutorial
From the course: C++ Essential Training
Primitive arrays
- [Instructor] The primitive array type is commonly called a C-array because it's inherited from the C language. A primitive is a type that's defined as part of the language, as opposed to a derived type that's defined in a structure or a class. The array is a primitive type. Primitives are essential tools for building derived types. There's also an STL class called array and this can lead to some confusion. This lesson is not about the STL class. This lesson is about the primitive array data type or the C-array. An array is a fixed size container of objects where each object is the same type. This is a definition for an array of integers. The value in the square brackets defines the size of the array. This array has room for five integers. Once defined, the size of the array cannot be changed. At this point, the array is uninitialized. So each of the five integer values are undefined. It's always a good idea to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Overview of data types3m 21s
-
(Locked)
Integer types2m 43s
-
(Locked)
Floating point types6m 51s
-
(Locked)
The auto type4m 2s
-
(Locked)
Qualifiers4m 33s
-
(Locked)
Type aliases2m 5s
-
(Locked)
Primitive arrays5m 23s
-
(Locked)
C-strings4m 37s
-
(Locked)
Structures2m 50s
-
(Locked)
Challenge: Library card2m 9s
-
(Locked)
Solution: Library card1m 16s
-
-
-
-
-
-
-