Sounds like a graph theory problem, which is a tad more than "Assigning values to data in C/C++", which is a trivial thing. Your post sounds more like a request for a design than help for a program, but you might check out the graph theory thing. At any rate, to assign values in C/C++, one uses the "=" operator. That doesn't apply to arrays, which contain multiple values.