C++ pi的定义我定义了类CTextclass CText:public CDraw{...protected:con

学习 时间:2026-04-02 19:40:03 阅读:8977
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,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.cppDrawDoc.cppDrawView.cppGenerating 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 externalsError executing link.exe.Draw.exe - 3 error(s), 0 warning(s)

最佳回答

专一的身影

甜美的龙猫

2026-04-02 19:40:03

你这个是mfc工程吧?自己还是好好看看哪个工程的错误吧,然后一点点把错误的范围缩小。已经提示你是DrawDoc文件中的这个方法CDraw::DLtoVL(float)有问题了,你自己在查查把。

最新回答共有2条回答

  • 刻苦的水杯
    回复
    2026-04-02 19:40:03

    你这个是mfc工程吧?自己还是好好看看哪个工程的错误吧,然后一点点把错误的范围缩小。已经提示你是DrawDoc文件中的这个方法CDraw::DLtoVL(float)有问题了,你自己在查查把。

上一篇 照样子写词语:各式各样

下一篇 人类的历史有多少年了?最早的人类是哪里来的啊