-
September 13th, 2007, 02:22 AM
#1
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
-
September 13th, 2007, 03:23 AM
#2
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').
-
September 13th, 2007, 04:48 AM
#3
Re: char scan
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
-
September 13th, 2007, 10:30 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|