Below is posted a program as assigned halfway through my C++ class. I do not need any help doing the project itself, I just need help trying to get through the typographical errors and vagueness! Can someone give a shot at possibly trying to rewrite what he is asking for?
In my opinion one aspect of what he is asking for is conflicted 3 times!
Write a program with overloaded function for computing the average of integers, or appending characters (same name average for both functions). The integer unction should allow between 1 and 5 arguments, the character function between 0 and 5 - all these should be handled with default arguments. Test in an application, program looping until the user says no more (end of the file). Every time through the loop, the program will ask whether integers or characters are being given and how many (1 to 5 or 0 to 5), check the entry, and then will ask for the proper number of inputs separated by spaces. You may assume correct data type and a match beween the number of arguments stated and actually supplied. For characters, the function should produce a dynamically allocated NTS string by appending all the characters, returned by a pointer. Make sure not to leak memory. For integers, the average will be produced (as a float), returned by copy. If the call is made with no arguments, an exception message (string) should be thrown and handled by catching it, displaying "Error: " followed by the actual message thrown, and going on for another iteration of the loop.
Note: there will be different function calls for different number of arguments, thus for example if the user enters 2 characters a and b, the call should be average(a,b) and if the user entered no arguments the call should be average().
Make sure to put the functions in fun.cpp (with fun.h) and the application in app.cpp
For example, this is how the program should run (follow closely, user input in italic):
Welcome to my average program...
What data you have and how many: 1=integers 2=chars: 1 2
Enter 2 integers: 10 20
The result is 15
What data you have and how many: 1=integers 2=chars: 2 2
Enter 2 characters: a b
The result is ab
What data you have and how many: 1=integers 2=chars: ^D