DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   Using .length() with multidimensional char array ? (Help) (http://www.daniweb.com/forums/thread5863.html)

rodkay May 8th, 2004 2:09 am
Using .length() with multidimensional char array ? (Help)
 
1 Attachment(s)
Hi all,

Quite a basic question for most of you; I am trying to obtain length of a string < char name[MAX_ENTRIES][MAX_NAME_SIZE] > for use in a for loop that will perform isalpha.

for (int j=0; j < &name[i].length(); j++)

I am getting error 2228: left of '.length' must have class/struct/union type upon compile.

Can anyone please offer me some guidance?

This is a simple win32 console application. See attached code.

Fili Jun 19th, 2004 2:44 pm
Re: Using .length() with multidimensional char array ? (Help)
 
How exactly do you want to get length?!!
The only way I know of is using <string.h> There is a strlen(char *s) function which return the strings length :D


All times are GMT -4. The time now is 11:03 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC