2
#include <vector>
using namespace std;
int main(){
vector<double> one;
one.size;
return 0;
}
error C3867: 'std::vector<_Ty>::size': function call missing argument list; use '&std::vector<_Ty>::size' to create a pointer to member
1> with
1> [
1> _Ty=std::vector<double>
1> ]
我正在使用Visual Studio 2012.任何想法是什麼導致這些錯誤?
'size'是成員函數,而不是數據成員 - 'one.size();'。 – ildjarn
大小的函數。添加()。如在「函數調用缺少參數列表」中。 – walrii