How do I combine two arrays? One String array and an Int array to a char array?
I need the output to be like this
Str array[0], int array[0]
Str array[1], int array[1]
and so on..
How do I combine two arrays? One String array and an Int array to a char array?
I need the output to be like this
Str array[0], int array[0]
Str array[1], int array[1]
and so on..
where should the output go and what is the problem?
In C arrays need to be the same type of things. There are no mixed arrays. You should be able to create a struct and have a array of that.
struct myThing{
int a;
int b;
};
struct myThing array;
I do not think you can create an array of String in C, because they are not fixed in size. You could use a char[fixed_size] in your struct.
If that is not what you are looking for, could you please elaborate a bit on your example?