Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Array Loop
Name: Grune Date: February 20, 2002 at 09:47:14 Pacific
Comment:
I have a char name[20]. I want to insert one letter at a time into this array. So I am doing this:
I would rather loop this if possible. How is this done? My problem is say name[1] and then somehow change it to name [2] in the loop. i tried saying name++, but it doesn't work for char I think. If this is not clear please say so. Thank you
Summary: Lets assume C++ :) int myArray[50]; /* Elements are indexed from 0 to 49 */ Arrays start normally with an index of 0. So to extract the information from each element of the array, loop through it with...
Summary: GPP's method is probably how you need to approach this problem. Take the initial array, loop through it and only extract the ones you need and assign them into another array. If you really want "ease"...
Summary: Here's one way: Declare a variable called Max. Set it equal to the first member of the array. Loop through the array and compare each member with Max. If you find a member of the array that is GREATE...