本文整理汇总了C++中Place::setLongitude方法的典型用法代码示例。如果您正苦于以下问题:C++ Place::setLongitude方法的具体用法?C++ Place::setLongitude怎么用?C++ Place::setLongitude使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Place
的用法示例。
在下文中一共展示了Place::setLongitude方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: start
/**Operational method for the class;
* Called to prompt the user to specificy the Place Object's attribute they wish to change, and
* the value to set it to.
*
* @return Returns a pointer to itself (this)
*/
ModifyPlacesView* ModifyPlacesView::start() {
Place* place = getPlace(rootPlace);
string opts[3] = {"Name", "Longitude", "Latitude"};
OptionsView<string> view(opts, 3);
int menuSelection = 0;
do {
cout << LF << "\tWhat would you like to modify?" << LF;
switch (menuSelection = view.display()->getOption()) {
case 0:
place->setName(getAddress(1, "Please enter the name"));
break;
case 1:
place->setLongitude(inputFloat("Please enter the longitude"));
break;
case 2:
place->setLatitude(inputFloat("Please enter the latitude"));
break;
}
} while (menuSelection != 3);
return this;
}