答案 0 :(得分:1)
检查@IBOutLet
名为market
self.market.datasource = self
self.market.delegate = self
只需用
更改名称即可UIPickerView
检查#include <iostream>
#include <string>
#include <limits>
int main() {
char option;
const char sentinel = 'q';
bool quit = false;
for(int count = 0; count <= 20 && !quit; count++) {
std::string name;
bool invalid;
do {
invalid = false;
// Display menu
std::cout << "Welcome to the forum.\n";
std::cout << "Are you:\n";
std::cout << "1. A new member\n";
std::cout << "2. An existing member\n";
std::cout << "To exit press '" << sentinel << "'\n";
std::cin >> option;
switch(option) {
case '1':
std::cout << "You're a new member.\n";
std::cout << "Please enter your first name followed ";
std::cout << "by your last name.\n";
std::cout << "Then press return.\n";
std::cin >> name;
break;
case '2':
std::cout << "You're an existing member.\n";
break;
case sentinel:
quit = true;
break;
default:
std::cout << "You entered invalid input!\n\n";
std::cin.clear();
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
invalid = true;
continue;
}
} while(invalid);
}
std::cout << "Exiting...\n";
return 0;
}
的声明名称。