0
public:    
array<System::Byte>^ convert_to_byte(struct s)
{
    array<System::Byte>^ a = gcnew array<System::Byte>(5);
    return a;
}

gives me :

Error 1 error C2027: use of undefined type 'my_make_data::s'

mantal
  • 1,093
  • 1
  • 20
  • 38
  • 1
    Can you give us the definition of the struct? Where you have convert_to_byte(struct s), it's possible that there should be the name of the struct. – Yann Aug 20 '14 at 13:16
  • @Cyber Yes, probably. That `^` managed pointer and `operator gcnew` don't seem standard. – The Paramagnetic Croissant Aug 20 '14 at 13:16
  • have you defined that `struct s`? if you have, please give us some reference to that struct, else define it before you use it :) – nevets Aug 20 '14 at 13:19
  • Take a look [here][1] it might help you out! [1]: http://stackoverflow.com/questions/15181765/passing-structs-to-functions – robbannn Aug 20 '14 at 13:19

1 Answers1

0

struct s shall be defined outside the function.

Also it is not clear why it is present in the function definition as a parameter type specifier when no object of this type is used within the function body.

Vlad from Moscow
  • 301,070
  • 26
  • 186
  • 335