R
Raghu
Hello all,
I have a problem in intialising a structure which contains an objetc ofa a
class.I am getting the compiler error C2440.
For example.
struct test
{
MyClass t1_f;
UWORD t2_uw;
};
And if i intialise the structure as follows:
struct test myTest_st[2] = {
{
0.0f,
20
},
{
1.0f,
20
}
};
I am getting the compiler error as follows:
error C2440: 'initializing' : cannot convert from 'const float' to 'struct
test'
No constructor could take the source type, or constructor overload
resolution was ambiguous.
Please help me to resolve it.
Thanks in advance
Raghu.
I have a problem in intialising a structure which contains an objetc ofa a
class.I am getting the compiler error C2440.
For example.
struct test
{
MyClass t1_f;
UWORD t2_uw;
};
And if i intialise the structure as follows:
struct test myTest_st[2] = {
{
0.0f,
20
},
{
1.0f,
20
}
};
I am getting the compiler error as follows:
error C2440: 'initializing' : cannot convert from 'const float' to 'struct
test'
No constructor could take the source type, or constructor overload
resolution was ambiguous.
Please help me to resolve it.
Thanks in advance
Raghu.