BUG: Developer Studio Exits When Creating a Derived Class

ID: Q193477


The information in this article applies to:


SYMPTOMS

When creating a derived C++ class, Developer Studio exits with no warning or error message.


CAUSE

A global variable of that class was declared before the derived C++ class was defined.


RESOLUTION

Always define the class first before declaring global variables from that class.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open a C++ project in Developer Studio.


  2. In one of the source files, declare the following global variable:
    
          CDerivedTest g_Test; 


  3. Position the cursor above this declaration, and begin defining the CDerivedTest class as follows:
    
          class CDerivedTest : public CBaseTest 


RESULTS: Before finishing the first line of the class definition, Developer Studio will exit without warning.

In this example, writing the CDerivedTest class definition first avoids the problem.


REFERENCES

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

Q153284 INFO: Limitations of IntelliSense in Visual C++ 6.0


Keywords          : kbEditor kbide kbVC600bug kbDevStudio kbGrpDSTools 
Version           : WINNT:6.0
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: July 15, 1999