D - Strange behavior of typedef
- Matthias Becker (10/10) Jan 27 2004 class MyClass {}
- Walter (4/14) Jan 28 2004 I don't know what you meant to happen here, but "typdef" should be
- Matthias Becker (5/24) Jan 29 2004 Sorry, I ment.
class MyClass {} typdef MyTypedef {} class MyDerived : MyClass {} class MyTypedefDerived : MyTypedef {} int main () { MyClass foo = new MyDerived(); // works fine MyTypedef bar = new MyTypedefDerived(); // doesn't work :( return 0; }
Jan 27 2004
"Matthias Becker" <Matthias_member pathlink.com> wrote in message news:bv5i4g$1g73$1 digitaldaemon.com...class MyClass {} typdef MyTypedef {}I don't know what you meant to happen here, but "typdef" should be "typedef", and the syntax is for a class declaration, not a typedef.class MyDerived : MyClass {} class MyTypedefDerived : MyTypedef {} int main () { MyClass foo = new MyDerived(); // works fine MyTypedef bar = new MyTypedefDerived(); // doesn't work :( return 0; }
Jan 28 2004
"Matthias Becker" <Matthias_member pathlink.com> wrote in message news:bv5i4g$1g73$1 digitaldaemon.com...Sorry, I ment. class MyClass {} typdef MyClass MyTypedef; Damn. I had this at home, but hadn't have the time to report it. So I did it the next day at work (so I caouldn't use copy&paste).class MyClass {} typdef MyTypedef {}I don't know what you meant to happen here, but "typdef" should be "typedef", and the syntax is for a class declaration, not a typedef.class MyDerived : MyClass {} class MyTypedefDerived : MyTypedef {} int main () { MyClass foo = new MyDerived(); // works fine MyTypedef bar = new MyTypedefDerived(); // doesn't work :( return 0; }
Jan 29 2004