Hi, I am new to C++ (as you may be able to tell). I have been working on a project, and have a source code file with my functions definitions for use in the main source code file. One of these functions is the geometric mean function which I have programmed as follows:
Here, ret[] is an array of returns (doubles varying around 0).
I have found the issue lies in the un-commented section of the code, which keeps returning 0 when I build and run(once fixed I will run the commented code also).
I would really appreciate if anyone could shed light on this. Let me know If there is information I need to provide that I have not.