[ fromfile: types-questions.xml id: types-questions ]
What is the difference between a statement and an expression?
An expression has a type and a value. A statement is just something to be executed. Statements are grouped with {} while expressions are grouped with the ().
What is the difference between an overloaded operator and a function?
All averloaded operators have corresponding function definitions. In fact, it is possible to invoke operators using the function call syntax. Therefore, operators are just syntactic shorthand for certain functions.
What ways can you introduce a new type into C++?
class, struct, enum, typedef
Which cast operator is best suited for numeric values?
static_cast
What happens when you assign an int
variable to a double
value?
Which cast operator is best suited for downcasting through polymorphic hierarchies?
dynamic_cast
Why are ANSI casts preferred over C-style casts?
What is a situation that you might find the reinterpret_cast
used in a reasonable way?
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |