What is the difference between the iterators defined here.
vector
//put 10 values into vec
const vector
vector
The difference here is what we are promising not to change. With regard to p, it is p itself that can’t be changed. With q, it is what q points to that can’t be changed.
Example:
*p = 0; //OK to change vec where p points,
p = vec.end();//error: l-value specifies const object
//can’t change p itself
q = vec.end();//OK to change q
*q = 0; //error l-value specifies const object
//can’t change vec where q points.
You might also like to view...
Class String and the Char structure are found in the:
a) System.Strings namespace b) System.Chars namespace c) System.Text namespace d) System namespace
Which of the following refers to the amount of horizontal space between characters?
A) Character spacing B) Scaling C) Kerning D) Position
Which protocol enables operating systems and applications to access directories?
A. SNMP B. SAMBA C. SMB D. LDAP
Small slices of a data mart are called data warehouses.
Answer the following statement true (T) or false (F)