How can i assign entire array values to another array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i assign entire array values to another array

hi . i used genetic algorithm for finding best solution in my program and i want to assign newgeneration to current generation.they are tow dimentional arrays.how can assign entire array values to another array. is it wright: currentgenration= newgeneration; (where currentgeneration = [ 100,10] and also newgeneration)

7th Jul 2017, 7:15 AM
Abolhasan Me
Abolhasan Me - avatar
3 Answers
+ 1
you can use array copy as mentioned in the documentation => https://msdn.microsoft.com/en-us/library/k4yx47a1(v=vs.110).aspx that will be helpful for your mutation operations.
7th Jul 2017, 7:20 AM
mada badr eddine
mada badr eddine - avatar
0
ok thank you. but when i want to copy entire elements ,for length parameter what i need to enter?
7th Jul 2017, 7:32 AM
Abolhasan Me
Abolhasan Me - avatar
0
thanks every one.
7th Jul 2017, 1:30 PM
Abolhasan Me
Abolhasan Me - avatar