[omniORB] I have a small problem.
unixwrld
unixwrld at yahoo.com.ar
Wed Nov 3 11:59:35 GMT 2004
I have my IDL file:
interface MyObject {
struct PERSON {
long lId;
string<32> sName;
};
typedef sequence<PERSON> PERSONS;
void ShowPerson(out PERSONS p);
};
and I have my method definition for ShowPerson:
class MyObject_i:public POA_MyObject,public PortableServer::RefCountServantBase {
public:
virtual void ShowPerson(MyObject::PERSONS_out p);
};
void MyObject_i::ShowPerson(MyObject::PERSONS_out p) {
p=new MyObject::PERSONS();
p->length(2);
p[0].lId=1L; // line 12
p[0].sName=CORBA::string_dup("Hola"); // line 13
p[1].lId=2L; // line 14
p[1].sName=CORBA::string_dup("Mundo"); // line 15
}
But in MSVC++ (6.0) it didn't compile :^(
The errors:
seqout.cpp(12) : error C2666: '[]' : 2 overloads have similar conversions
seqout.cpp(12) : error C2228: left of '.lId' must have class/struct/union type
seqout.cpp(13) : error C2666: '[]' : 2 overloads have similar conversions
seqout.cpp(13) : error C2228: left of '.sName' must have class/struct/union type
seqout.cpp(14) : error C2666: '[]' : 2 overloads have similar conversions
seqout.cpp(14) : error C2228: left of '.lId' must have class/struct/union type
seqout.cpp(15) : error C2666: '[]' : 2 overloads have similar conversions
seqout.cpp(15) : error C2228: left of '.sName' must have class/struct/union type
what happen? :^/
Thank!
---------------------------------
Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar.
Encontrá más información aquí.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20041103/1046f154/attachment.htm
More information about the omniORB-list
mailing list