040.程序流程结构-跳转语句-goto语句

#include <iostream>
using namespace std;
int main()
{
    //goto语句

    cout << "1.xxxxxxxxxx" << endl;
    cout << "2.xxxxxxxxxx" << endl;
    goto AA;//跳转到标记
    cout << "3.xxxxxxxxxx" << endl;
    cout << "4.xxxxxxxxxx" << endl;
AA://标记,后面使用冒号
    cout << "5.xxxxxxxxxx" << endl;

    system("pause");
    return 0;
}

 

上一篇:关于instrinsicContentSize, ContentHuggingPriority, ContentcompressionResistancePriority的理解


下一篇:Java中goto用法