c++.beta - default c'tor - syntax problem
- Richard Grant (14/14) Feb 09 2003 The example below compiles fine with "A a();" in main replaced with "A a...
- Christof Meerwald (8/14) Feb 09 2003 AFAIK, DMC's behaviour is correct.
- Richard Grant (3/12) Feb 09 2003 And you are correct.. Thanks,
The example below compiles fine with "A a();" in main replaced with "A a;".
AFAIK there should be no problem with either syntax..
struct A {
A() { }
void fn() { }
};
void main() {
A a();
a.fn();
// Error: not a struct or union type
// Warning 6: value of expression is not used
}
Low priority.
Richard
Feb 09 2003
On Sun, 9 Feb 2003 16:13:39 +0000 (UTC), Richard Grant wrote:void main() { A a();This declares "a" as a function returning A.a.fn(); // Error: not a struct or union type // Warning 6: value of expression is not used }AFAIK, DMC's behaviour is correct. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Feb 09 2003
In article <b260id$2c3g$1 digitaldaemon.com>, Christof Meerwald says...On Sun, 9 Feb 2003 16:13:39 +0000 (UTC), Richard Grant wrote:And you are correct.. Thanks, Richardvoid main() { A a();This declares "a" as a function returning A.a.fn(); // Error: not a struct or union type // Warning 6: value of expression is not used }AFAIK, DMC's behaviour is correct.
Feb 09 2003








Richard Grant <fractal clark.net>