CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: char scan

  1. #1
    Join Date
    Jun 2001
    Location
    Germany
    Posts
    136

    char scan

    char narAlfs[] = { "Q","W","E","R","T","J", };
    char *parAlf = narAlfs;

    How can easy way char scan no needs to array loop? That is all of char (a-z) scan way to

  2. #2
    Join Date
    Aug 2007
    Location
    Farnborough, Hants, UK
    Posts
    45

    Re: char scan

    The code you have shown won't even compile.

    Anything in single quotes - like this: 'X' - is a char.
    Anything in double quotes - like this: "X" - is a string.

    In C and C++, a string is an array of characters where the last entry in the array is the null terminator character ('\0').

  3. #3
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: char scan

    Quote Originally Posted by Hakan Bulut
    char narAlfs[] = { "Q","W","E","R","T","J", };
    char *parAlf = narAlfs;

    How can easy way char scan no needs to array loop? That is all of char (a-z) scan way to
    You have to search thru all the characters (if they are in an array), there is not shortcut possible, all the functions which do this, go thru the array one way or another.
    Regards,
    Ramkrishna Pawar

  4. #4
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,207

    Re: char scan

    [ Moved thread ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)