foo:
pushl %ebp
movl %esp,%ebp
movl 12(%ebp),%ecx
xorl %eax,%eax
movl 8(%ebp),%edx
cmpl %ecx,%edx
jle .L3
.L5:
addl %edx,%eax
decl %edx
cmpl %ecx,%edx
jg .L5
.L3: leave
ret
Run Code Online (Sandbox Code Playgroud)
我知道xorl是for循环的指示符(int i = 0),但我无法理解代码的其余部分......有人可以给我一个提示吗?
谢谢!
#include <iostream>
using namespace std;
#include <string>
// Sequence containers
#include <list>
#include <vector>
int main() {
string sve[MAX] = { "one","two", "three", "four", "five" };
//2
vector <string> vstr;
//3
for(int i=0;i<MAX;i++)
vstr.push_back(sve[i]);
//4
cout<<"---Vector---\n";
for each (string s in vstr)
cout<<s<<endl;
Run Code Online (Sandbox Code Playgroud)
错误:预期"("之后for.错误发生在每一行
我不认为我错过了任何包含,这很奇怪.即时通讯xcode 4.3