plz tl me how to find length of integer array
pavan146 -1 Newbie Poster
Recommended Answers
Jump to Postusing
len = array.length( );
functionnn
Correct me if I'm wrong, but length() works for strings not integer arrays. If it does work then please demonstrate how, because I got a syntax error trying it.
Here's some code that I know works. It shows 2 ways of getting the …
Jump to Postusing
len = array.length( );
functionnn
As Crazyboy says, use the following:
string str (ARRAYNAME); SomeLengthVar=str.length();
or simply use:
strlen(ARRAYNAME));
That's about the easiest way
Did you read the question? He's asking for how to get the length of an integer array, not a string.:P strlen(MyIntArray) is just …
All 8 Replies
wingless 0 Newbie Poster
crazyboy -4 Junior Poster in Training
necrolin 94 Posting Whiz in Training
Skeen 0 Junior Poster in Training
Skeen 0 Junior Poster in Training
necrolin 94 Posting Whiz in Training
kri_prasad2000 -4 Newbie Poster
Skeen 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.