Hello everyone!
I'm a beginner with C, having learned some basics in a university course, but I want to get better at programming. It's also my first post here :3
Now, on to my question.
I have created a 2d char array which I want to fill by using for functions. They should all have values in the form of "i,j", where i and j are the coordinates of each string in the array (i.e. the first element of the first line should have a value of 1,1).
However, I can't figure out how to make the i and j in the value assignment variable. So, I'm stuck with
Code:
for(i=1; i<=SIZE; i++)
for(j=1; j<=SIZE; j++)
map[i][j]="i,j";
but I don't know what to do to make the last i and j variable, so every element just gets the value "i,j" instead of the correct numbers.
Thanks in advance for any help!
EDIT: I'd also like to be able to read the values I give to each element, aka its coordinates.