0
C++ Array Math
I am a beginner in C++, but have been studying long enough to make a bsic calculator. I have been wondering though, is it possible to tell a funtion to find two separate pieces of data in an array and perform a math operation on them? For example, if I had an array of int basicArray [] {1, 2, 3, 4, 5}; Could I make a funtion find two of those numbers and perform math on them? Also, would this change their values within the array or could I just find those values, and then separately perform the equation in question?
1 Answer