Re: string of ascii chars?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Heinz Ozwirk (wansor42_at_gmx.de)
Date: 07/15/04


Date: Thu, 15 Jul 2004 13:02:09 +0200


"Andru" <andru123 at hotmail dot com> schrieb im Newsbeitrag news:uLXQy8kaEHA.712@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I'd like to specify the string of ASCII chars, codes of which I know.
>
> CString str = "\13" + "\10" + "\25";
>
> ^^
> does not work :(

You cannot add pointers.

>
> Neither works
> CString str = _T("\13\10\25");
>
> What are the possible and preferred ways to do that?

Do what? The last line of code does work and initializes str with a string of characters 0x0B, 0x08 and 0x15. Numbers following \ in a string or char literal are octal. If you want a string starting with carriage return and linefeed you should write "\x0D\x0A..." or "\15\12..." or "\r\n...".

HTH
    Heinz



Relevant Pages

  • string of ascii chars?
    ... I'd like to specify the string of ASCII chars, codes of which I know. ...
    (microsoft.public.vc.language)
  • A new proposed model of computation and an attempted proof that P != NP
    ... each address corresponds to a string that is identical to the address. ... the pre-existing tape at adddress 23421000. ... we'll have what we'll term a "header" to specify TMs. ... polyclocking, if applicable, or just junk characters otherwise. ...
    (comp.theory)
  • Re: Web DAV only works when authenticated to OWA
    ... > Dim objRequest 'As MSXML.XMLHTTPRequest ... > Dim strXMLNSInfo 'As String ... > ' Specify the URL of the new object to be created. ... > ' Put it all together in an HTTP request. ...
    (microsoft.public.exchange.development)
  • Re: Grabbing string values from the end of a string of an unknown
    ... having to specify the parameter values/never run macros unless excel has just ... Not if the string is produced by a formula. ... shown below in this recorded macro are restored. ... The settings for LookIn, LookAt, SearchOrder, and MatchByte are saved each ...
    (microsoft.public.excel.programming)
  • Web DAV only works when authenticated to OWA
    ... Dim objRequest 'As MSXML.XMLHTTPRequest ... Dim strXMLNSInfo 'As String ... ' Specify the URL of the new object to be created. ... ' Specify the Business Address Information. ...
    (microsoft.public.exchange.development)