Hi there, pretty new to programming and I would appreciate if someone more experienced could give me some pointers on what to correct in my code. I'm getting a compiling error that is saying "could not convert... from void to bool" in reference to line 40 which contains "getTrialElements(inFile, elementArray)" in my int main
I'm assuming I made some kind of simple and obvious mistake in my function header but I am unsure as to what that might be. Below is the beginning of my code, the function definitions have been left out for brevity's sake. For this assignment I am NOT allowed to change the int main
Well the issue is that getTrialElements returns type is of type void. However, in line 40 you are using that function in the while loop as a means of a flag. Thus, the compiler issues an error that it can't convert void, the return type of getTrialElements, to bool. To fix this have getTrialElements return type be of type bool, or any type that can be converted to bool.