Per said:
Hi!
Does it take longer time to initialize a class
A class cannot be initialized. A class specifies a type.
An object of class (or any other) type can be intitialized.
with many
member-functions
than one with fewer?
The language does not specify at all how long
a particular construct takes to execute. This depends
entirely upon the implementation and the host platform.
But in practice, I would not expect any performance difference
between initializing an object of a type with no member functions
and one with many.
Will the sizeof (Some Class) return more bytes on a class with more
member-functions etc...
No, the count of member functions does not affect the value
returned by applying 'sizeof' to the type containing those
member functions. It will report a size at least equal to
(but often greater than) the sum of the sizes of its data
members. The minimum it will report is a size of 1, even
for an 'empty' class such as:
class X
{
};
sizeof(X); /* yields a value >=1 */
-Mike