How can i assign a two dimensional array into other temporary two dimensional array.....?? in C Programming..
- by AGeek
Hi I am trying to store the contents of two dimensional array into a temporary array.... How is it possible... I don't want looping over here, as it would add an extra overhead.. Any pointer notation would be good.
struct bucket
{
int nStrings;
char strings[MAXSTRINGS][MAXWORDLENGTH];
};
void func()
{
char **tArray;
int tLenArray = 0;
for(i=0; i<TOTBUCKETS-1; i++)
{
if(buck[i].nStrings != 0)
{
tArray = buck[i].strings;
tLenArray = buck[i].nStrings;
}
}
}
The error here i am getting is:-
[others@centos htdocs]$ gcc lexorder.c
lexorder.c: In function âlexSortingâ:
lexorder.c:40: warning: assignment from incompatible pointer type
Please let me know if this needs some more explanaition...