Image

Imagegouda329 wrote in Imagecpp

I have a question. I'm working on a project and I cannot get two arrays to add together? Any ideas?

Here are the two arrays:
int list1[size] = {8, 4, 6, 10, 3};
int list2[size] = {1, 3, 5, 7, 9};

And then I need to put it in list3 using functions.

I tried doing:
list3[0] = list1[0]+list2[0];
etc..

That did not seem to work. I guess my question is how do I make form into an array. I can add all the numbers together, I just can't make them just add in their respective places.

Thank you!

Carol