Class

xiaoxiao2021-03-06  20

Due to handle, in the statement of a class, Class_a A (); a.test (); more "()", think about there is no mistake, I think it should be called the default structure, but compile, actually there is wrong. Tip: Test Must Have Class / Struct / Union Type is carefully considered. It turned out that it was compiled, and the compiler did not treat A as an example of Class_a, but a declaration of a function of a parameter as a Void. As described below: (the compiler is VC6.0, instead of using basic type Int) void main () {int a (); // a = 10; // Compile not via INT (p * ) (); P = a; printf ("% d", p ());} int A (void) {return 0L;} Oh, I have never paying attention to this.

转载请注明原文地址:https://www.9cbs.com/read-44912.html

New Post(0)