|
-
July 16th, 2010, 07:23 AM
#9
Re: Something about arrays
Ok I have an array
Apples[3] = {'green', 'red', 'yellow'};
I want to extract element 2 from the array. I know how display the contents as so:
Apples[2]; //shows yellow
I wants be able to show the element I'd like so:
cout << "element id = " << // code to show "2" for element 3 with contents yellow
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
|