从Object数组中转换值 [英] Casting values from Object array

查看:121
本文介绍了从Object数组中转换值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的代码中,我们将数据加载到Vector变量中。但是,在使用第三方API时,我们需要以数组形式发送数据,例如作为double值数组(double x [] [])。


I尝试了以下代码并且无法编译:

In our code we load data into Vector variables. However, in using a third party API we are required to send it the data in array form, for example as an array of double values (double x[][]).

I tried the following code and failed to compile:

展开 | 选择 | Wrap | 行号

推荐答案

我很确定你有初始化时指定数组的所有维度。所以试试:

I''m pretty sure you have to specify all of the dimensions of an array when initializing. So try:

展开 | 选择 | Wrap | 行号



我是确保在初始化时必须指定数组的所有维度。所以试试:

I''m pretty sure you have to specify all of the dimensions of an array when initializing. So try:

展开 | 选择 | Wrap | 行号


我们能确切看到编译错误是什么吗?
Could we see exactly what the compilation error is?


这篇关于从Object数组中转换值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆