每調用一次函數,輸出加1 c++ 實現

每調用一次函數,輸出加1 c++ 實現ios #include<iostream> using namespace std; int PlusOne(){ static int i = 1; return i++; } int main(){ cout << "first call" << endl; cout << PlusOne() << endl; cout << "
相關文章
相關標籤/搜索