本文整理汇总了C++中Triangle::SetSecondPointY方法的典型用法代码示例。如果您正苦于以下问题:C++ Triangle::SetSecondPointY方法的具体用法?C++ Triangle::SetSecondPointY怎么用?C++ Triangle::SetSecondPointY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Triangle
的用法示例。
在下文中一共展示了Triangle::SetSecondPointY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartMenu
//.........这里部分代码省略.........
case kCircleChoiseType:
{
figureChoise = kCircleChoiseType;
break;
}
default:
{
printf(kNoCorrespondingOptionErrorMessage);
break;
}
}
break;
}
case kEnterFigureParametersChoiseType:
{
if (figureChoise == kRectangleChoiseType)
{
printf(kEnterRectangleXCoordinetMessage);
printf(kInputSymbolMessage);
int rectX;
cin >> rectX;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewRectangle.SetLeftDownAngleX(rectX);
printf(kEnterRectangleYCoordinetMessage);
printf(kInputSymbolMessage);
int rectY;
cin >> rectY;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewRectangle.SetLeftDownAngleY(rectY);
printf(kEnterRectangleWidthMessage);
printf(kInputSymbolMessage);
int rectWidth;
cin >> rectWidth;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewRectangle.SetWidth(rectWidth);
printf(kEnterRectangleHeightMessage);
printf(kInputSymbolMessage);
int rectHeight;
cin >> rectHeight;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewRectangle.SetHeight(rectHeight);
}
else if (figureChoise == kTriangleChoiseType)
{
printf(kEnterLeftDownAngleXCoordinetMessage);
printf(kInputSymbolMessage);
int leftDownAngleX;
cin >> leftDownAngleX;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewTriangle.SetFirstPointX(leftDownAngleX);
printf(kEnterLeftDownAngleYCoordinetMessage);
printf(kInputSymbolMessage);
int leftDownAngleY;
cin >> leftDownAngleY;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewTriangle.SetFirstPointY(leftDownAngleY);
printf(kEnterRightDownAngleXCoordinetMessage);
printf(kInputSymbolMessage);
int rightDownAngleX;
cin >> rightDownAngleX;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewTriangle.SetSecondPointX(rightDownAngleX);
printf(kEnterRightDownAngleYCoordinetMessage);
printf(kInputSymbolMessage);
int rightDownAngleY;
cin >> rightDownAngleY;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewTriangle.SetSecondPointY(rightDownAngleY);
printf(kEnterUpperAngleXCoordinetMessage);
printf(kInputSymbolMessage);
int upperAngleX;
cin >> upperAngleX;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewTriangle.SetThirdPointX(upperAngleX);
printf(kEnterUpperAngleYCoordinetMessage);
printf(kInputSymbolMessage);
int upperAngleY;
cin >> upperAngleY;
if (!MakeCheckForNumberInputFromCin(kEnterCorrectValueErrorMessage))
break;
NewTriangle.SetThirdPointY(upperAngleY);
}
else if (figureChoise == kCircleChoiseType)