C++ pi的定义我定义了类CTextclass CText:public CDraw{...protected:const float pi;public:CText();CText(short ColorPen,short ColorBrush,short LineWide,shortLineType,short Layer,int id_only,BOOL Delete,float StartX,float StartY,float Angle1,floa

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/26 12:16:07
C++  pi的定义我定义了类CTextclass CText:public CDraw{...protected:const float pi;public:CText();CText(short ColorPen,short ColorBrush,short LineWide,shortLineType,short Layer,int id_only,BOOL Delete,float StartX,float StartY,float Angle1,floa
xU[OA+Z]zCL\ZBb/dfv%(AE#EPIDoȟ̶,}r3̹ws&M'G`"ɴu۹u_3t?`YG,e t'Ƨ"I :9U'b omQQpܭ" AhJ@!U6Ee.Hd ȧx_4ZY{-`]@?U^,p_m Es/MpJTc`x`l(HN75[_֋Y:~H@ bG'Mrŕ^ T)%dΟKbq01LrB Ś,1@(A902Š5ÐO\U;3&\#7BKhoqf;~)wyW5@f$2C(8{jEpryjXDLFh,zIt*P/q3hICVX10Qݹ$Qd)>=.oG7{ͩU{Seo];|V?|\Y_;͞W޼^˙6T{~87>;s<vޟIη/Bbz|Yh4bŵKKW@k/uxkv6ZEE

C++ pi的定义我定义了类CTextclass CText:public CDraw{...protected:const float pi;public:CText();CText(short ColorPen,short ColorBrush,short LineWide,shortLineType,short Layer,int id_only,BOOL Delete,float StartX,float StartY,float Angle1,floa
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 "public: void __thiscall CDraw::DPtoVP(float,float,int *,int *)" (?DPtoVP@CDraw@@QAEXMMPAH0@Z)
DrawDoc.obj : error LNK2001: unresolved external symbol "public: int __thiscall CDraw::DLtoVL(float)" (?DLtoVL@CDraw@@QAEHM@Z)
Debug/Draw.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Draw.exe - 3 error(s), 0 warning(s)

C++ pi的定义我定义了类CTextclass CText:public CDraw{...protected:const float pi;public:CText();CText(short ColorPen,short ColorBrush,short LineWide,shortLineType,short Layer,int id_only,BOOL Delete,float StartX,float StartY,float Angle1,floa
你这个是mfc工程吧?自己还是好好看看哪个工程的错误吧,然后一点点把错误的范围缩小.已经提示你是DrawDoc文件中的这个方法CDraw::DLtoVL(float)有问题了,你自己在查查把.