I cant compile this code as Im at work and the computers are security protected, So i''l have to wait until i get home to test this, but im pretty sure im wrong. The problem is I have to create two vectors with 10 elements and input random numbers into it, then pick one of the elements of the second vector at random and append it to an element from the first vector at random. This has to be done 10 times and the im assuming i have to print the 10 results. This is what I have so far I feel like I really need some help this book doesnt really seem to cover it for me. Thank you in advance.
Thanks modoran so I have tested and recieved alot of errors but i debugged them down to two.
1. error: expected ',' or ';' before 'srand'
srand ((unsigned)time(0));
2. 'append' was not declared in this scope
sum = append(random[i], random2[i]);
I have no idea what is wrong with the first error, the second one I think Im using the wrong formula so to speak to combine the two vectors. Any one have any pointer?
Man I was way off I appreciate all the help I just have question about the last function int_append, Can you explain to me exactly what it does Chriscpp?