| Absinthe (2) | |||
I have been playing with some code generation and I ran across something that would seem like it should rais a compile error but it doesn't. However, it does not function as one might think either. What does it do? (See a2)
Thanks, -- Abs | |||
|
|
|||
| ne555 (4385) | |
A a2(); a function that returns an `A' object and receives no parameters.
| |
|
|
|
| Absinthe (2) | |||||||||
|
I misunderstood what you said and posted incorrectly. So what I am actually doing is creating a forward declaration, (prototype statement). So it is valid for the compiler, but surely it doesn't do what was expected :) However, if I had a constructor such as:
I could declare:
In much the same way I could declare and instantiate integers:
or strings:
Seems an strange syntactical twist, no? | |||||||||
|
|
|||||||||