撰寫一個通常接受一個引數(字串地址)列印該字串,如果提供第2個引數(int型別)該值不為0,則該函式列印字串的次數等于函式被呼叫的次數.(列印次數不等于第2個引數,等于函式被呼叫的次數)
書上的題目沒有搞明白函式呼叫次數是怎么來的求幫
uj5u.com熱心網友回復:
static int FunCalledTimes=0;FunCalledTimes++;
for(int i=0;i<FunCalledTimes;i++)
列印字串
uj5u.com熱心網友回復:
感謝!明白了轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/75950.html
標籤:茶館
上一篇:C++ Builder Timer控制元件雙擊出現Cannot find implementation of method Timer1Timer錯誤?
