我不知道这里发生了什么。我没有得到任何错误,程序命中第一个函数,然后跳过返回0.这是我正在做的练习。用户将在苏打水机中输入一个号码,然后他们会收到他们选择的项目。任何帮助将不胜感激!
Set objCollection = IE.document.getElementsByTagName("input")
I = 0
While I < objCollection.Length
If objCollection(I).Name = "SELECTED" Then
objCollection(I).Value = "12345"
End If
If objCollection(I).Type = "submit" And objCollection(I).Name = "View" Then ' submit button if found and set
Set objElement = objCollection(I)
End If
I = I + 1
Wend
objElement.Click
WaitIE
答案 0 :(得分:0)
int processSelection();
这是一个功能声明。它告诉编译器有一个函数processSelection
不带参数并返回int
- 但编译器已经知道了。
要调用该函数,您可以写:
processSelection();
和dropSoda
相同。
答案 1 :(得分:0)
您的主要功能是声明功能,而不是呼叫它们。
int _tmain(int argc, _TCHAR* argv[])
{
Menu(); // menu called
// declare a function `processSelection` taking no arguments and returning an int
int processSelection();
// again, functoin declaration
void dropSoda();
return 0;
}
要修复,请按照调用Menu()
int _tmain(int argc, _TCHAR* argv[])
{
Menu();
processSelection();
dropSoda();
return 0;
}