C++ pi的定义
题目
C++ pi的定义
我定义了类CText
class CText:public CDraw
{...
protected:
const float pi;
public:
CText();
CText(short ColorPen,short ColorBrush,short LineWide,short
LineType,short Layer,int id_only,BOOL Delete,float StartX,float StartY,float Angle1,float Angle2,float TextHeight,float TextWide,float OffWide,unsigned char TextFont,CString Text)
:CDraw(ColorPen,ColorBrush,LineWide,LineType,Layer,id_only,Delete),pi(float(3.14159265))
{
m_StartX=StartX;
m_StartY=StartY;
m_Angle1=Angle1;
m_Angle2=Angle2;
m_TextHeight=TextHeight;
m_TextWide=TextWide;
m_OffWide=OffWide;
m_TextLong=Text.GetLength(); //计算字符长度
c_Text=Text;
}
}
...
};
但是显示
--------------------Configuration: Draw - Win32 Debug--------------------
Compiling...
Draw.cpp
DrawDoc.cpp
DrawView.cpp
Generating Code...
Linking...
DrawDoc.obj : error LNK2001: unresolved external symbol "
答案
你这个是mfc工程吧?自己还是好好看看哪个工程的错误吧,然后一点点把错误的范围缩小.已经提示你是DrawDoc文件中的这个方法CDraw::DLtoVL(float)有问题了,你自己在查查把.
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
热门考点
- 我国出租车收费标准因地而异,乙城市:起步价5元,1km后每千米1.4元;甲城市:起步价8元,3km后每千米1.5元
- 写出电解重水的化学方程式 和写出重氢形成的盐酸和碳酸钙反应的化学方程式
- 初二关于平行四边形的几何题!
- 邓稼先的读后感400字左右!
- 材料力学剪切面和挤压面怎么判断啊
- 防尘防水灯PAK-D15-140C(电子镇流器) 是多少w,ip等级是多少
- 如果∠A是锐角,sinA=四分之三,那么
- 2,4,6,8,10,哪些是合数
- How about eat some fish.改同义句.
- 宇宙本质是什么?存在于宇宙之外的又是些什么呢?