Hello this is my first thread on the forum i tried to search everywhere for a solution but no result...:'(
Im trying to figure out some easy pointer use but still get some stupid error... My fault.
error C2440: '=' : cannot convert from 'char (*)[100]' to 'char'
void split(char *src, char c)
{
char temp[100];
int i;
for(i=0;*src!=0;i++)
{
if(i%2==0)
{
temp[i]=*src;
*src++;
}
else
temp[i]=c;
}
*src=&temp; //c2440
}
void main()
{
char *src="eretznehederet", sep='-';
split(src,sep);
printf("%s\n", src);
}
thanks anyway for all the help I can get and no problem for anyone that I helped with this thread.
Seaman34.