August 06, 2006 class type definition problem | ||||
---|---|---|---|---|
| ||||
class A{
}
main()
{
/+
A b; //<------- this is ok before A is declared as a int variable
+/
int A;
A b; // actually i want b declared as class A. but d sees it as variable int A;
// even if D think this would cause by mistaken programming, can D provide one way for
// us, like "class A b" to define b as Class A?
}
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
August 06, 2006 Re: class type definition problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to david | david wrote:
> can D provide one way for
> us, like "class A b" to define b as Class A?
There are at least two ways already:
1)
module mod;
...
mod.A b;
...
2)
...
.A b;
...
|
Copyright © 1999-2021 by the D Language Foundation