字典翻译 问答 其它 C++pi的定义我定义了类CTextclassCText:publicCDraw{...protected:constfloatpi;public:CText();CText(shortColorPen,shortColorBrush,shortLineWide,shortLineType,shortLayer,intid_only,BOOLDelete,floatStartX,floatStartY,floatAngle1,floa
问题标题:
C++pi的定义我定义了类CTextclassCText:publicCDraw{...protected:constfloatpi;public:CText();CText(shortColorPen,shortColorBrush,shortLineWide,shortLineType,shortLayer,intid_only,BOOLDelete,floatStartX,floatStartY,floatAngle1,floa
问题描述:

C++pi的定义

我定义了类CText

classCText:publicCDraw

{...

protected:

constfloatpi;

public:

CText();

CText(shortColorPen,shortColorBrush,shortLineWide,short

LineType,shortLayer,intid_only,BOOLDelete,floatStartX,floatStartY,floatAngle1,floatAngle2,floatTextHeight,floatTextWide,floatOffWide,unsignedcharTextFont,CStringText)

: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-Win32Debug--------------------

Compiling...

Draw.cpp

DrawDoc.cpp

DrawView.cpp

GeneratingCode...

Linking...

DrawDoc.obj:errorLNK2001:unresolvedexternalsymbol"public:void__thiscallCDraw::DPtoVP(float,float,int*,int*)"(?DPtoVP@CDraw@@QAEXMMPAH0@Z)

DrawDoc.obj:errorLNK2001:unresolvedexternalsymbol"public:int__thiscallCDraw::DLtoVL(float)"(?DLtoVL@CDraw@@QAEHM@Z)

Debug/Draw.exe:fatalerrorLNK1120:2unresolvedexternals

Errorexecutinglink.exe.

Draw.exe-3error(s),0warning(s)

陈根方回答:
  你这个是mfc工程吧?自己还是好好看看哪个工程的错误吧,然后一点点把错误的范围缩小.已经提示你是DrawDoc文件中的这个方法CDraw::DLtoVL(float)有问题了,你自己在查查把.
点击显示
其它推荐
热门其它推荐
  • 其它