How to type cast the boost ::variant

Dear Friends, I have almost similar kind of program typedef std::vector<int> vec_name; struct network { boost::variant<vec_name> net_id; }; typedef std::vector<network>network_list; in main when I am extracting content of network_list vector in the following manner // create the instance for vector network_list net_list; for(int i=0; i<net_list.size(); ++i) { unsigned char* query_str = net_list[0].net_id; } when I am doing like this in the above line of code the bellow error is giving , but what I understand is I am not properly typecasting. Please can any one will help me how get out of this problem Error is: error: cannot convert boost::variant<odtone::mih::null, std::vector<std::basic_string<char> > > to unsigned char* in assignment Best Regards BaBu -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
participants (1)
-
Baba Prasad