【发布时间】:2013-02-09 20:21:08
【问题描述】:
所以,我不能像这样编译我的代码:
std::vector<std::string> split = split("A String Blah");
使用此方法签名:
std::vector<std::string> split(const std::string& s)
因为它说它需要多个参数。为什么仅仅一个字符串还不够?
【问题讨论】:
-
确切的错误信息是什么?
-
Error 1 error C2660: 'split' : function does not take 1 arguments c:\users\aidan\documents\visual studio 2012\projects\mathhelper\mathhelper\mathhelper.cpp 59 1 MathHelper跨度>
-
是您认为您从 MathHelper 库调用的
split? -
您是否在尝试调用函数之前创建了函数原型?
-
问题是我更新方法签名时忘记更新原型了。谢谢@JoachimPileborg!
标签: c++ methods arguments signature