如何将向量转换为数组如何转换std::vector<double>转到double array[]?
                    
                    
                3 回答
                            蛊毒传说
                            
                                
                            
                        
                        
                                                
                    TA贡献1895条经验 获得超3个赞
do_something(&v[0], v.size())vdouble
double arr[100];std::copy(v.begin(), v.end(), arr);
arrarr
                            素胚勾勒不出你
                            
                                
                            
                        
                        
                                                
                    TA贡献1827条经验 获得超9个赞
vector<double> thevector; //... double *thearray = &thevector[0];
thearraythevector
- 3 回答
 - 0 关注
 - 987 浏览
 
添加回答
举报
0/150
	提交
		取消
	