听的不是很清楚啊。贴出来Look
解决方案 »
- VC2010 工具栏CMFCToolBar停靠在左侧或右侧时,如何保持显示文字
- BoundsCheckerv8.2版本使用出错
- vc picture conteol jpg显示问题 [救急...]
- 多线程问题
- help? CBrush如何释放,才能让GDI Objects数值不增加
- bi.bibitcount为8的图像转灰度图象的问题
- 求高手指点(编译过程出现不能访问私有成员;strname,homeaddress,number),有构造函数也不行
- CStatic派生了一个类,关于透明!
- Hook 的问题
- 一个关于socket api 中recv函数的问题
- 怎么使AVI播放完了程序才往下行?
- 用作制作帮助文件的helpworkshop是vc自带的吗?如果不是自带的,那么在哪里可以下载?有教程么?难不难用?
我在主程序里有两句这样的代码:
C1* pC1 = new C1;
C2* pC2 = new C2;三个类的头文件为:
// C.h: interface for the CC class.
//
//////////////////////////////////////////////////////////////////////#if !defined(AFX_C_H__1046D5D9_7945_4EC1_8426_0CEB56355350__INCLUDED_)
#define AFX_C_H__1046D5D9_7945_4EC1_8426_0CEB56355350__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000class CC
{
public:
CC();
virtual ~CC();};#endif // !defined(AFX_C_H__1046D5D9_7945_4EC1_8426_0CEB56355350__INCLUDED_)
// 1.h: interface for the C1 class.
//
//////////////////////////////////////////////////////////////////////#if !defined(AFX_1_H__FC17ACA9_92B7_438E_A3B6_EADC9B987DCD__INCLUDED_)
#define AFX_1_H__FC17ACA9_92B7_438E_A3B6_EADC9B987DCD__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000#include "C.h"class C1 : public CC
{
public:
C1();
virtual ~C1();public:
bool m_bRight;};#endif // !defined(AFX_1_H__FC17ACA9_92B7_438E_A3B6_EADC9B987DCD__INCLUDED_)
// 2.h: interface for the C2 class.
//
//////////////////////////////////////////////////////////////////////#if !defined(AFX_2_H__4C61BD3B_8E54_4650_9E93_BB824D6E66DF__INCLUDED_)
#define AFX_2_H__4C61BD3B_8E54_4650_9E93_BB824D6E66DF__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000#include "C.h"class C2 : public CC
{
public:
C2();
virtual ~C2();};#endif // !defined(AFX_2_H__4C61BD3B_8E54_4650_9E93_BB824D6E66DF__INCLUDED_)三个类的Cpp文件是:// C.cpp: implementation of the CC class.
//
//////////////////////////////////////////////////////////////////////#include "stdafx.h"
#include "hhhh.h"
#include "C.h"#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////CC::CC()
{}CC::~CC()
{}
// 1.cpp: implementation of the C1 class.
//
//////////////////////////////////////////////////////////////////////#include "stdafx.h"
#include "hhhh.h"
#include "1.h"#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////C1::C1()
{
m_bRight = true;}C1::~C1()
{}// 2.cpp: implementation of the C2 class.
//
//////////////////////////////////////////////////////////////////////#include "stdafx.h"
#include "hhhh.h"
#include "2.h"#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////C2::C2()
{ //运行到这里的时候C1类的m_bRight出错。}C2::~C2()
{}