kathyayini
Programmer
I am attaching the code :
char* inullable[20];
char* temp_inullable="1,2,3"
int nLoop=0;
char cstemp_str[20]="a";
strcpy(cstemp_str,""
int icoma_trap=0;
nLoop=0;
while(*temp_inullable !='\0')
{
if(*temp_inullable !=',')
{
strncat( cstemp_str, temp_inullable, 1);
temp_inullable++;
}
else
{
strcpy(inullable[nLoop],cstemp_str);
strcpy(cstemp_str,""
temp_inullable++;
nLoop++;
}
}
program is giving the err "Unhandled exception/ Access violation" while executing "strcpy(inullable[nLoop],cstemp_str);" line what could be the problem
waiting for the reply
char* inullable[20];
char* temp_inullable="1,2,3"
int nLoop=0;
char cstemp_str[20]="a";
strcpy(cstemp_str,""
int icoma_trap=0;
nLoop=0;
while(*temp_inullable !='\0')
{
if(*temp_inullable !=',')
{
strncat( cstemp_str, temp_inullable, 1);
temp_inullable++;
}
else
{
strcpy(inullable[nLoop],cstemp_str);
strcpy(cstemp_str,""
temp_inullable++;
nLoop++;
}
}
program is giving the err "Unhandled exception/ Access violation" while executing "strcpy(inullable[nLoop],cstemp_str);" line what could be the problem
waiting for the reply