我想創建可以運行得很快的代碼。 爲了做到這一點,我在需要時將一些變量初始化。 例如:(我不能更改標籤\轉到部分,我必須使用它針對這種情況)C++破壞手冊
bool Func(bool BooleanParameter) {
if (BooleanParameter)
goto _true;
else
goto _false;
_true:
string str; //Some code after that one that does with this variable
return false;
_false:
return true; //Exception because str doesn't initialized
}
但有例外,因爲有沒有辦法不初始化變量和變量在最後破壞。
不要使用goto語句。這絕對沒有進展。 – poitroae 2012-07-29 13:40:13
「有天賦的才華」是什麼意思? – 2012-07-29 13:40:39
你憑藉'具有天賦'的才能?聽起來有點像搶先優化... – Burkhard 2012-07-29 13:40:42