Sorry must repost in this thread...
This comiles in gcc but not on vc++
Error message is something like....
structs.h(171) : error C2440: 'initializing' : cannot convert from 'class
std::basic_stri ng<char,struct std::char_trait s<char>,class
std::allocator< char> >' to 'atype'
typedef struct
{
string a;
string b;
} atype;
string ABC = ("123");
string DEF = ("456");
atype mylist[] =
{
{"ABC", ABC},
{"DEF", DEF}
};
This comiles in gcc but not on vc++
Error message is something like....
structs.h(171) : error C2440: 'initializing' : cannot convert from 'class
std::basic_stri ng<char,struct std::char_trait s<char>,class
std::allocator< char> >' to 'atype'
typedef struct
{
string a;
string b;
} atype;
string ABC = ("123");
string DEF = ("456");
atype mylist[] =
{
{"ABC", ABC},
{"DEF", DEF}
};
Comment