Forum: GNU Radio how arrays work

2d0f6bc46e0515bc4d82688718650b25?d=identicon&s=25 MHMND Herath (Guest)
on 2013-12-27 10:35
(Received via mailing list)
I wrote this array under the
interp_ff_impl::work(int noutput_items,
        gr_vector_const_void_star &input_items,
        gr_vector_void_star &output_items)

int f[m];
 I could not initialise by
int f[m]={0};
block is also not work can we write array like the above in gnuradio c++
code
C539637020fd56193dd6daec746c4a84?d=identicon&s=25 Tom Rondeau (Guest)
on 2013-12-30 15:51
(Received via mailing list)
On Fri, Dec 27, 2013 at 4:43 AM, MHMND Herath <mhher@ou.ac.lk> wrote:
>         I wrote this array under the
> interp_ff_impl::work(int noutput_items,
>                           gr_vector_const_void_star &input_items,
>                           gr_vector_void_star &output_items)
>
> int f[m];
>  I could not initialise by
> int f[m]={0};
> block is also not work can we write array like the above in gnuradio c++ code

This is really a C++ question and not a GNU Radio question. But,
anyways, without more information about 'm', I would say no, generally
this is not acceptable C++ code since you're trying to create an array
with a variable as the size of the array.

But look to the C++ forums and reask the question there if you cannot
find it.

Tom
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.