Sun C++ : Unexpected type Badly formed expression using String

G

Gil

This is a question involving CORBA but the problem shows up
using Sun C++. The problem doesn't occur with Visual C++ 6.

I'm using a string in the following form in my CORBA IDL declaration
so both the client and server will have common strings defined.

module A {
interface B {
const string MY_STRING = "thestring";
}
};

After compiling this idl, I'm using the generated string in a call
like the following :

functioncall(A::B.MY_STRING);

This call works fine in Microsoft Visual C++ 6.0 on Windows, but on
Solaris, with Sun C++, I'm getting the following error :

"code.h", line 389: Error: Unexpected type name "A::B" encountered.
"code.h", line 389 Error: Badly formed expression.

Would anyone familiar with Sun C++ have an idea how or if I can use
the above expression?
 
M

morice

Try this:
functioncall(A.MY_STRING);

Gil said:
This is a question involving CORBA but the problem shows up
using Sun C++. The problem doesn't occur with Visual C++ 6.

I'm using a string in the following form in my CORBA IDL declaration
so both the client and server will have common strings defined.

module A {
interface B {
const string MY_STRING = "thestring";
}
};

After compiling this idl, I'm using the generated string in a call
like the following :

functioncall(A::B.MY_STRING);

This call works fine in Microsoft Visual C++ 6.0 on Windows, but on
Solaris, with Sun C++, I'm getting the following error :

"code.h", line 389: Error: Unexpected type name "A::B" encountered.
"code.h", line 389 Error: Badly formed expression.

Would anyone familiar with Sun C++ have an idea how or if I can use
the above expression?


~ Let us linux ~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top