Boost logo

Boost Users :

Subject: [Boost-users] Error while typecasting the boost::variant ( need help)
From: Baba Prasad (gbabu_at_[hidden])
Date: 2012-04-13 15:01:31


Dear Friend

my program is

typedef std::vector<int> vec_name;

struct network
{
boost::variant<vec_name> net_id;
};

typedef std::vector<network>network_list;

// 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;
}

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.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net