Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 正在搜索链接到cout的变量的名称!像a:coutc++;_C++_Windows_Cout_Goto - Fatal编程技术网

C++ 正在搜索链接到cout的变量的名称!像a:coutc++;

C++ 正在搜索链接到cout的变量的名称!像a:coutc++;,c++,windows,cout,goto,C++,Windows,Cout,Goto,当我在互联网上通过源代码搜索新信息时, 我看到有人将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

当我在互联网上通过源代码搜索新信息时, 我看到有人将
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
void主菜单(){
int i;
cout 5 | | i<1{

cout没有变量
a
链接到
cout
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

有效的C?因为
http
https
被视为标签,并且
/
开始注释。

您是否询问
goto
和标签,因为这是代码所做的。顺便说一句,使用空格而不是制表符。制表符可以表示8、3、4或2个空格。制表符可以表示将空格移到下一个制表位(可能是间歇性的)。标签也可以忽略。非常感谢兄弟
void f()
{
  http://stackoverflow.com
  https://stackoverflow.com
}