P
pfsi
main.cpp
1: typedef struct A {
2: int x;
3: }A_t;
4:
5: int main() {
6: A_t *a;
7: a = &(A_t());
8: return 0;
9: }
---------------------
When I use g++(2.96) to compile this program, it report an error at line 7.
Error Message is : main.cpp:7: parse error before `;'
But this program can be pass in VC6, who can tell me why?
thanks.
1: typedef struct A {
2: int x;
3: }A_t;
4:
5: int main() {
6: A_t *a;
7: a = &(A_t());
8: return 0;
9: }
---------------------
When I use g++(2.96) to compile this program, it report an error at line 7.
Error Message is : main.cpp:7: parse error before `;'
But this program can be pass in VC6, who can tell me why?
thanks.