搜索链接到 cout 的变量的名称!像 a:cout c++
searching for the name of a variable linked to a cout! like a:cout c++
当我在互联网上通过源代码搜索新信息时,
我看到有人用 goto
给一个变量,这个变量被链接到一个 cout
语句,与 std::cout
.
相同
他写了a:cout
。
你能帮我找到这个函数的名字吗?
void Main_Menu() {
int i;
cout << "\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t HOSPITAL MANAGEMENT SYSTEM \n\n";
cout << "\n\n\t\t\t\t\t\tPlease, Choose from the following Options: \n\n";
cout << "\t\t\t\t\t\t _________________________________________________________________ \n";
cout << "\t\t\t\t\t\t| |\n";
cout << "\t\t\t\t\t\t| 1 >> Add New Patient Record |\n";
cout << "\t\t\t\t\t\t| 2 >> Add Diagnosis Information |\n";
cout << "\t\t\t\t\t\t| 3 >> Full History of the Patient |\n";
cout << "\t\t\t\t\t\t| 4 >> Information About the Hospital |\n";
cout << "\t\t\t\t\t\t| 5 >> Exit the Program |\n";
cout << "\t\t\t\t\t\t|_________________________________________________________________|\n\n";
a: cout << "\t\t\t\t\t\tEnter your choice: ";
cin >> i;
if (i > 5 || i < 1) {
cout << "\n\n\t\t\t\t\t\tInvalid Choice\n";
cout << "\t\t\t\t\t\tTry again...........\n\n";
goto a;
} //if inputed choice is other than given choice
没有链接到 cout
的变量 a
。 a:
是一个标签,您可以使用 goto a;
跳转到该标签。代码也可以这样写
a:
cout << "\t\t\t\t\t\tEnter your choice: ";
cin >> i;
if (i > 5 || i < 1) {
cout << "\n\n\t\t\t\t\t\tInvalid Choice\n";
cout << "\t\t\t\t\t\tTry again...........\n\n";
goto a;
} //if inputed choice is other than given choice
有趣的旁注:为什么
void f()
{
http://whosebug.com
https://whosebug.com
}
C 有效吗?因为 http
和 https
被视为标签并且 //
开始评论。
当我在互联网上通过源代码搜索新信息时,
我看到有人用 goto
给一个变量,这个变量被链接到一个 cout
语句,与 std::cout
.
他写了a:cout
。
你能帮我找到这个函数的名字吗?
void Main_Menu() {
int i;
cout << "\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t HOSPITAL MANAGEMENT SYSTEM \n\n";
cout << "\n\n\t\t\t\t\t\tPlease, Choose from the following Options: \n\n";
cout << "\t\t\t\t\t\t _________________________________________________________________ \n";
cout << "\t\t\t\t\t\t| |\n";
cout << "\t\t\t\t\t\t| 1 >> Add New Patient Record |\n";
cout << "\t\t\t\t\t\t| 2 >> Add Diagnosis Information |\n";
cout << "\t\t\t\t\t\t| 3 >> Full History of the Patient |\n";
cout << "\t\t\t\t\t\t| 4 >> Information About the Hospital |\n";
cout << "\t\t\t\t\t\t| 5 >> Exit the Program |\n";
cout << "\t\t\t\t\t\t|_________________________________________________________________|\n\n";
a: cout << "\t\t\t\t\t\tEnter your choice: ";
cin >> i;
if (i > 5 || i < 1) {
cout << "\n\n\t\t\t\t\t\tInvalid Choice\n";
cout << "\t\t\t\t\t\tTry again...........\n\n";
goto a;
} //if inputed choice is other than given choice
没有链接到 cout
的变量 a
。 a:
是一个标签,您可以使用 goto a;
跳转到该标签。代码也可以这样写
a:
cout << "\t\t\t\t\t\tEnter your choice: ";
cin >> i;
if (i > 5 || i < 1) {
cout << "\n\n\t\t\t\t\t\tInvalid Choice\n";
cout << "\t\t\t\t\t\tTry again...........\n\n";
goto a;
} //if inputed choice is other than given choice
有趣的旁注:为什么
void f()
{
http://whosebug.com
https://whosebug.com
}
C 有效吗?因为 http
和 https
被视为标签并且 //
开始评论。