gpt4 book ai didi

c++ - 无法访问 vector 大小

转载 作者:搜寻专家 更新时间:2023-10-31 00:00:12 24 4
gpt4 key购买 nike

<分区>

        #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。知道是什么导致了这些错误吗?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com