Question: How can you implement a dynamic data type array?
One minute response: We'll cover this in detail in the next section, but essentially you allocate larger or smaller vectors as you need them, and copy the existing data to the new vector each time, deallocating the old vector when done.
Question: Why use multidimensional arrays?
One minute response: Sometimes it's a useful way to organize data. For example, you can consider a year to be a 4-dimensional vector: a year is a vector of 12 months; a month is a vector of 4 weeks, a week is a vector of 7 days; and a day is a vector of 24 hours.
Question: What is the difference between signed and unsigned?
One minute response: Integers I'm guessing you're asking about. Unsigned integers can only represent non-negative numbers.
Question: How do vectors deviate from the [?].
Question: What's an integer?
Question: How and in what way are signed and unsigned data implemented?
One minute response: The only way signed and unsigned data differ is in the way they're handled in the CPU, which is determined by the code; otherwise, signed and unsigned data are identical.
Question: I would like a more clear answer about unsigned integers because listening and reading the book has left me with a very general definition.
One minute response: O.k., but what's the question to which you want an answer?
Question: argv
is a vector, but not the same type you told us about. What is it?
One minute response: It's a matrix (that is a 2-dimensional array) but instead of each element of argv
being another vector, it's a pointer to a vector. This arrangement is useful for argv
because it allows having rows of different sizes without wasting space.
Question: What is the difference between one dimension and a plain array.
One minute response: There is no clear difference; the terminology varies widely. I consider the unadorned term "array" to mean an array of arbitrary dimensions, while a vector is a 1-dimensional array.
Question: No more questions at this time.
Question: Are regular ints signed or unsigned?
One minute response: Without designation, int
s are signed.
Question: I'd like to see more about signed usage.
One minute response: Signed usage is the default, so you've been using all along. About what in particular did you want to see more of?
This page last modified on 16 July 2003.