I am programming in C and have initialized 2 arrays as shown below:
char names[3][10] = {"foo","ba", "foofoo"};
int values[3] = {1,2,3};
I would like to initialize these in the form:
int foo = 1;
int ba = 2;
int foofoo = 3;
This would not be a problem if the arrays were small, but I am wondering if there is a particular way in which I could initialize these variable names within a for-loop?