Hello al bama cpp,
PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.
Starting at the top. Why all the header files? All you need is "iostream" for this
program. The rest are never used and more than half are the C++ version of a C header file.
Line 30)
int n, i, max, min;
you need to initialize your variables. Always a good idea to initialize your variables where ever they my be, i.e., local or global. Also a good idea to initialize "min" to a value greater than what could be in the array.
Your menu choices are backwards compared to the case statements or the other way around.
In case 2 the function call
minValue(lists, min, i);
you are passing "min" and "i", but in the function definition
minValue(int lists[],int i, int min)
notice the difference in the order of the variables. Since "i" is zero when passed in the function "min" becomes zero in the function then in the if statement nothing is less than zero so zero is returned at the end of the function.
In the end the variable "i" does not need to be passed to either function because it is never used in either function and the for loops create the local variable "i" for the use in the loop.
After that I added some "\n"s to the cout statements so the output does not run together.
Hope that helps,
Andy