char skype[6] = "Skype";
HWND firstwindow = FindWindowEx(NULL, NULL, NULL, NULL);
HWND window = firstwindow;
TCHAR windowtext[MAX_PATH]; //search term
//We need to get the console title in case we
//accidentally match the search word with it
//instead of the intended target window.
TCHAR consoletitle[MAX_PATH];
GetConsoleTitle(consoletitle, MAX_PATH);
while(true){
//Check window title for a match
GetWindowText(window, windowtext, MAX_PATH);
if (strstr(windowtext, skype)!=NULL && strcmp(windowtext, consoletitle)!=0) break; //search for program
//Get next window
window = FindWindowEx(NULL, window, NULL, NULL);
if(window == NULL || window …Run Code Online (Sandbox Code Playgroud) 我需要以下c ++代码的帮助,尝试continue在程序的末尾添加一个,以便它为矩形创建用户指定的维度,并要求用户重新重做该程序.
在程序的最后部分编译并运行它没有愚蠢的if和else语句,并且它可以工作.但随着continue/递归,它失败了.LOLZ.我= noob.
int main()
{
int height, width, tmp, tmp2;
char continue;
cout << "Please Enter The Height Of A Rectangle (whole numbers only): ";
height:
cin >> height;
if(height<1)
{
cout << " Please Enter A Height Of Between 1 And 20: ";
goto height;
}
cout << "Please Enter The Width Of A Rectangle (whole numbers only): ";
width:
cin >> width;
if(width<1)
{
cout << " Please Enter A Width Of …Run Code Online (Sandbox Code Playgroud)