例如:
struct Spell
{
int id;
vector<int> cost(4);
};
Run Code Online (Sandbox Code Playgroud)
它说
'Expected parameter declaration'.
Run Code Online (Sandbox Code Playgroud)
另外这段代码有什么区别吗?
if (can(vector <int>inv, spell.cost))
{
cout << "CAST " << spell.id << endl;
done = true;
break;
}
Run Code Online (Sandbox Code Playgroud)
这个说
'Expected '(' for function-style cast or type construction'
Run Code Online (Sandbox Code Playgroud)
有机会可以帮我一下吗?