I am kind of new to c++, so I am not sure where to put the definition of the vector and the "input_sizes.push_back" in the .cc file. (after de include? after the sptr? in the definition of the sptr? in a new method?). Here is the "official" example:
-- A block with 2 inputs (float and double) and 1 output --
std::vector<int> input_sizes;
input_sizes.push_back(sizeof(float));
input_sizes.push_back(sizeof(double));
gnuradio::block("my block",
gr_make_io_signaturev(2, 2, input_sizes),
gr_make_io_signature(1, 1, sizeof(float)))
The example can be found in 1 :