View Single Post
Old Mar 18th, 2006, 11:46 PM   #7
codylee270
Unverified User
 
Join Date: Sep 2005
Posts: 209
Rep Power: 0 codylee270 is an unknown quantity at this point
Ahhh.. the for loop... I knew it was causing a problem, but of course i overlooked the fact that i itself is never going to increment to '\0'...lol.....
I changed it to

cout << "You entered: ";
     while(nums[i] != '\0')
     {
          cout << nums[i] << " " ;
          i++;
     }

I totally forgot about .size(). I figured there was something for that but I wasn't sure. lol.. and i really wanted to do it without passing the actual length max given at the beginning.

Now.. i just need to figure out FIND. Correct me if i'm wrong, but aren't you supposed to provide it with a preferred starting and ending point in the array and a value you want to search for. From what i understand i believe it's supposed to return the index of where that value is in the array. I wasn't sure on that so i took a stab at it and went ahead an added one to the result for FIND to give a location in a list. And i still don't know if that is correct or not, b/c again, FIND isn't working..lol...

Thanks for all of you help guys...
codylee270 is offline   Reply With Quote