才学C++。想请教一个问题。关于delay的
我们老师要我们找写循环体代替delay(time)但是有些细节问题我不明白怎么写。跪求大神们解答。前面是
int title (); //接受用户的输入
void diskcopy ();
void diskformat ();
void diskcompare ();
void diskbackup();
void (*operdisk[]) () = { diskcopy , diskformat , diskcompare , diskbackup , d};
void main ()
{ int choice = title(); //调用函数
while ( choice != 4 )
{ ( * operdisk [chocie] ) ();
cout << endl;
choice = title ();
}
}
其中一个
void diskcopy ()
{ cout << " disk copy operation..." << endl;
cout << " copy disk from driver A to driver B..." <<endl;
delay(time)
cout << " disk copy completely! " << endl;
delay(time)
}
这个delay(time)该怎么把循环体加进去才不会出现error