Hi guys,

I have some peculiar problem, where in .cpp file is including v4l2
kernel header ( videodev2.h ) and it has structure with an unnamed
variable as defined below,

struct v4l2_ext_control {
        __u32 id;
        __u32 size;
        __u32 reserved2[1];
        union {
                __s32 value;
                __s64 value64;
                char *string;
        };
} __attribute__ ((packed));

If i try to, declared a variable of this type and try to set some
value to the unnamed members, compiler is throwing error saying " no
such member in the struct".

/*-------------------------
example.cpp
--------------------------
*/
#include <videodev2.h>

struct v4l2_ext_control ctrl;
char *ptr = "sample String";

ctrl.string = ptr;              //Here, compiler is not able to detect
string as a member

Could you please, help me out with this ? Does the compiler not
support unnamed variables in Android.

Thanks,
Bhaktha

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to