I have a header file abc.h
//abc.h
unsigned int *get(void)
{
static unsigned int input[] =
{
1,
2, 2,
4, 5,
6, 7
};
return input;
}
Now, i want to read this input(from header file,not from some text file) into my main cpp file say xyz.cpp
I am thinking of using an array to access these elements,but i don't think it will work.
int arr[6];
arr=get();
The first element is number of test cases n,the second and third element are dimensions of 2-D array and the rest of the elements are the values of 2-D array.So i need to input value of n,rows,columns and values for 2D array arr[rows][columns]
Any ideas on how can i achieve this?
EDIT: I seriously can't figure out why this question is getting downvoted. I agree this is not a good implementation,but I have been given an input header file and i can read data only through this header file!!