[omniORB] Problems with string and double variable.
Alex Tingle
alex.tingle at bronermetals.com
Thu Oct 28 11:26:06 BST 2004
> catch(ACI::ENotAvailable& ex)
> {
> cerr << *ex.strMessage;
> }
'ex' is a reference.
'ex.strMessage' is (essentially) a char*.
What you wrote is equivalent to this:
cerr << *(ex.strMessage);
Try this instead:
cerr << ex.strMessage;
Or you might need:
cerr << ex.strMessage.in();
-Alex
--
Dammit Jim, I'm a programmer... not a mind reader!
On 28 Oct 2004, at 08:45, <concat833 at yahoo.com> wrote:
> Hello all,
> Could anyone help me to solve the following problems?
> In idl file, the exception is defined:
> module ACI
> {
> ....
> exception ENotAvailable
> {
> string strMessage;
> };
> ...
> }
> In the client application, I did:
> try{}
> catch(ACI::ENotAvailable& ex)
> {
> cerr << *ex.strMessage;
> }
> The strMessage is define with a full message by the server developer,
> but from the client side, I got only the first character of the
> strMessage. Is the problem from the server developer of from the client
> one? Can anyone help me out?
>
> And another problem with double variables.
> doubleSeq_var values; // doubleSeq is defined as a sequence of double.
> When I get the values, I print it out (cout << values[0];), it's really
> a double (eg 5.123). But if I put it in a double:
> double val = values[0];
> cout << val << endl;
> In this case, val is not really a double but only the integer part of
> it. (val = 5). Does anyone know why?
> Thank you in advance for any help.
> Tran Phuong Nga.
>
>
> _____
>
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete
> <http://us.rd.yahoo.com/mail_us/taglines/aac/*http://
> promotions.yahoo.co
> m/new_mail/static/ease.html> - You start. We finish.
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
More information about the omniORB-list
mailing list