[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Default Arguments in Member Functions

(ARM, §8.2.6) The compiler does not bind default arguments in a member function at the end of the class declaration. Before the default argument appears, you must declare any value that you use in the default argument expression. For example:
Using default arguments in member functions:
class foo {
enum A { AA };
int f(A a = AA); // OK
int f(B b = BB); // ERROR: BB is not declared yet
enum B { BB };
};
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 17, 2000