Write a function to prepare a text file input.txt by storing 100 random integers in the range from -50 to 50, one per line.
The file is returned as a result. Write a function inputfile () that takes a file as an argument and returns a sequential container filled with numbers from the file. Write a modify () function that receives the result container of the inputfile () function as an argument. The modified container is returned as a result. Add container-result of calculation of sum and average
arithmetic in absolute value. Use a vector, deque, and list as the container.
I have problems for 38, 56, 73, 116 strings of code (I maked this like comment)
This code make random integers but it does not make modify() and Add(). So on console I have: File is done! and Maiking of container... What Do I need to do?
For Add(D), D is of type deque<int> which as been initialised from the contents of the file. So conteiner.push_back(S) will push the value of S onto the deque. You are passing by ref, so after Add(D) in main(), D will reflect the new value that was pushed. If you display D before and after Add(D), then you should see the extra element.