
AMDG Niels Dekker - mail address until 2008-12-31 wrote:
First of all, your MyClass forward declaration should end with a semicolon (;), of course! Still, you're saying that the forward declaration would be sufficient when you declare an instance of a container from the Standard C++ Library, right? So would the following compile on your platform?
//---------------------------- #include <map> #include <string> using std::string ;
class MyClass ; std::map
my_map ; int main() { return 0 ; } //----------------------------
It doesn't compile on my platform. I also tried www.dinkumware.com/exam and www.comeaucomputing.com/tryitout
That can't possible compile. It is possible that
#include <map>
#include <string>
using std::string ;
class MyClass ;
extern std::map