Translated code is:
Code:mincost[i] = dist[0][i];
Printable View
This is a late response but thanks to all your responses.
I used a loop, since there are only 15 items.
But I wanted to code correctly,(considering the case of having 999999999999 items).
-cheers
You need to use dynamic memory management - ie malloc and free. And keep track of the size so you can resize it and know how many times to iterate.