2014-04-02から1日間の記事一覧
C/C++ではgotoが使える。とても自由なこの制御構文は、2重のforループを抜けるとき大変役立つ。 #include <iostream> using namespace std; void func() { cout << "In func()" << endl; goto exit; cout << "skip" << endl; exit: cout << "End of func()" << endl; }</iostream>…
C/C++ではgotoが使える。とても自由なこの制御構文は、2重のforループを抜けるとき大変役立つ。 #include <iostream> using namespace std; void func() { cout << "In func()" << endl; goto exit; cout << "skip" << endl; exit: cout << "End of func()" << endl; }</iostream>…