Please Help Me~ :)
Under code complie successful on visual studio. but, Under code could not complie on linux, g++.
The code..
A.h
struct Test { Test(); ~Test(); };
B.h
extern struct Test { Test(); ~Test(); };
A.cpp
#include "A.h"
Test::Test()
{
cout << "Construction" << endl;
}
Test::~Test()
{
cout << "Destruction" << endl;
}
B.cpp
#include "B.h"
strcut A_Test : Test { A_Test(); ~A_Test(); };
When I compiled code on linux. I got an error under description.
"a storage class can only be specified for objects and functions"
What is the problem this code on linux?
Thank you, all and plz understand my fool english.