Am I missing something completely. How can we simply put the value in definition line of the function. If so, whats the point of passing values if we have predefined it.
Something like this :
node( unsigned char c = 0, int i = 0)
Strange thing is this code runs, and executes properly. (Visual Studio 2010).
Is it something related to const function? But then there is no const mentioned.
Or something like this :
void traverse(string code="") const
But the earlier definition was not const’d.
These are default arguments. This means that you can write
node()in some body of code instead ofnode(0,0),node('x')instead ofnode('x',0). There’s nothing to stop you from usingnode('x', 2). In this casenodewill receive'x'and2as the values forcandi.