Click here to Skip to main content
15,742,464 members

Comments by Andreas Gieriet (Top 200 by date)

Andreas Gieriet 9-Oct-20 9:29am View    
If you want to make it robust, you also have to consider empty arrays. I.e. what to do for min/max/avg on empty arrays? Not to talk about overflow when calculating avg for large arrays/big numbers?
Andreas Gieriet 9-Oct-20 9:26am View    
You tagged as C++. So, you might want to look for something like this:
Andreas Gieriet 21-Oct-18 12:21pm View    
1. you should learn to ask questions such that we understand what your problem is. A statement like "does not work" is far far too fuzzy. What exectly do you do and what symptom tells you that it does not work? What is the expected behaviour?

2. You cannot expect anyone to compile and execute your code. Assume that one only reads your code and tries to make sense of it. See also item 1. above: we do not know what the expected behaviour is...

3. Looking at your code, I must assume that your code does not compile: you define a function *within* the main function. C/C++ do not allow for this.

4. If the code does not compile, you won't be able to execute it and thus, cannot expect any "output" from (not) executing the program ;-)

Andreas Gieriet 21-Oct-18 8:49am View    
Hey, you obviously don't take the time to write a decent question. Simply throwing code snippets at our faces is probably not the nicest approach...
Why should we take any time to "help" you.
You want something from us, so, make it easy for us to help you!
Andreas Gieriet 1-May-17 17:33pm View    
Any suggestion?