C++ 方法需要多个参数?

C++ 方法需要多个参数?,c++,methods,arguments,signature,C++,Methods,Arguments,Signature,所以,我不能像这样编译我的代码: std::vector<std::string> split = split("A String Blah"); std::vector split=split(“字符串废话”); 使用此方法签名: std::vector<std::string> split(const std::string& s) std::vector split(const std::string&s) 因为它说它需要不止一个论点。为什么

所以,我不能像这样编译我的代码:

std::vector<std::string> split = split("A String Blah");  
std::vector split=split(“字符串废话”);
使用此方法签名:

std::vector<std::string> split(const std::string& s)  
std::vector split(const std::string&s)

因为它说它需要不止一个论点。为什么仅仅一个字符串还不够?

当您有这行代码时:

std::vector<std::string> split = split("A String Blah"); 

希望这有帮助

当您有这一行时:

std::vector<std::string> split = split("A String Blah"); 

希望这有帮助

确切的错误消息是什么?错误1错误C2660:“拆分”:函数不带1个参数c:\users\aidan\documents\visual studio 2012\projects\mathhelper\mathhelper\mathhelper.cpp 59 1 mathhelper是您认为从mathhelper库调用的
拆分
?在尝试调用之前是否创建了函数原型函数?问题是我在更新方法签名时忘记了更新原型。谢谢@JoachimPileborg!确切的错误消息是什么?错误1错误C2660:“拆分”:函数不带1个参数c:\users\aidan\documents\visual studio 2012\projects\mathhelper\mathhelper\mathhelper.cpp 59 1 mathhelper是您认为从mathhelper库调用的
拆分
?在尝试调用之前是否创建了函数原型函数?问题是我在更新方法签名时忘记了更新原型。谢谢@JoachimPileborg!