Re: PString

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanx a lot. I am using 1.5.3.  what is latest version.

----- Original Message ----- 
From: "Craig Southeren" <craigs@xxxxxxxxxxxxxxxxx>
To: <openh323gk-users@xxxxxxxxxxxxxxxxxxxxx>; "Rafat Subhan"
<rafat@xxxxxxxxxxxxxxx>
Sent: Tuesday, August 10, 2004 04:20 PM
Subject: Re:  PString


> Recent versions of PWLib have a PString constructor that accepts a
> std::string, so you could do this:
>
> PString string(func());
>
> But if you are using an older version of PWLib, you still need to use a
> temporary as follows:
>
> std::string s = func();
> PString pstring(s.c_str());
>
>    Craig
>
> On Tue, 10 Aug 2004 20:09:45 +1000
> Craig Southeren <craigs@xxxxxxxxxxxxxxxxx> wrote:
>
> > On Tue, 10 Aug 2004 15:12:09 +0500
> > "Rafat Subhan" <rafat@xxxxxxxxxxxxxxx> wrote:
> >
> > > I am making some change in GK code, but in that function i am getting
std::String and i have to assign this value to some PString, can any help me
how to convert from String to PString.
> > >
> > > PString s;
> > > s= func(); //this func is returning PString
> >
> > The only guaranteed safe way is to use a temporary:
> >
> >    PString pstring = func;
> >    std::string s((const char *)pstring);
> -----------------------------------------------------------------------
>  Craig Southeren      craigs@xxxxxxxxxxxxxxxxx / craigs@xxxxxxxxxxxxx
>
>  Phone:  +61 243654666      ICQ: #86852844
>  Fax:    +61 243673140      MSN: craig_southeren@xxxxxxxxxxx
>  Mobile: +61 417231046   Jabber: craigs@xxxxxxxxxxxxxxxxxxxx
>
>  Post Increment - Consulting & Services    http://www.postincrement.com
>  Vox Gratia - The Open Source VoIP portal  http://www.voxgratia.org
>  Raving Of A Strange Mind - the VoIP blog  http://www.southeren.com/blog
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
>
> _______________________________________________________
>
> List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
> Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
> Homepage: http://www.gnugk.org/



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

_______________________________________________________

List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Homepage: http://www.gnugk.org/

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux