有一个类CVector3,在另外一个类中有一个私有成员这样定义:
// This is the vector list of all of our lines
vector<CVector3> m_vLines;
不知道是什么意思?
// This is the vector list of all of our lines
vector<CVector3> m_vLines;
不知道是什么意思?
解决方案 »
- wifi api的问题
- Vc.net 创建窗口问题
- 能解释一下 void**)&pIX 的意思吗?
- 散分了!
- 如何在多线程中调用COM对象
- CDMA网络编程的问题--还有这种事!!!高手请进!!!!!!!
- 如何为一个DataGrid控件增加数据源 在线等 急急 有答案立即结贴给分
- 大家指导一下学习COM的经验。
- 在线等待,关于DBGrid、Microsoft RemoteData Control这两个控件的使用
- bat后台打开问题
- Run-Time Check Failure #2 - Stack around the variable 'ch' was corrupted.
- 怎样确定一个形如#XXXXXX(X是一个十六进制数)的颜色值是否在16位颜色的范围内?
源程序是这样定义
// Debug.h: interface for the CDebug class.
//
//////////////////////////////////////////////////////////////////////#if !defined(AFX_DEBUG_H__31F8CDE6_8047_4A78_B75B_463F210F78CD__INCLUDED_)
#define AFX_DEBUG_H__31F8CDE6_8047_4A78_B75B_463F210F78CD__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CVector3.h"class CDebug
{
public:
CDebug();
virtual ~CDebug();
// This adds a line to our list of debug lines
void AddDebugLine(CVector3 vPoint1, CVector3 vPoint2); // This adds a rectangle with a given center, width, height and depth to our list
void AddDebugRectangle(CVector3 vCenter, float width, float height, float depth); // This renders all of the lines
void RenderDebugLines(); // This clears all of the debug lines
void Clear(); private: // This is the vector list of all of our lines
vector<CVector3> m_vLines;
};#endif // !defined(AFX_DEBUG_H__31F8CDE6_8047_4A78_B75B_463F210F78CD__INCLUDED_)
...
...
...
class CDebug{
public:
vector是属于C++标准库的一个类,它被封装在一个 std的命名空间里边。你的程序使用的mfc,而mfc并不直接支持这命名空间。首先程序应该包括 vector.h程序文件大概应该如下:#include <vector>#include "Vector3.h"...
...
...
...
class CDebug{
public:
...
...
....
privat
std::vector<CVector3> m_vLines;
..
};我都是这么用的,编译没有问题。