Hi! This is my code:
And this is my WhiteSpace2_ function:Code:... char tmpchar[255]; ... printf("Enter the filename: "); fgets(tmpchar,MAXFILES,stdin); strcpy(tmpchar,ws2_()); printf("%s\n",tmpchar); ....
Ok, afaik this should work. But it doesn't and gcc gives me warnings:Code:char *ws2_(void) { char *ws2_tmpchar[255]; int i; for(i = 0;i<=strlen(tmpchar);i++) { if(strcmp(tmpchar[i]," ") == 0) strcat(ws2_tmpchar[i],"_"); else strcat(ws2_tmpchar[i],tmpchar[i]); } return ws2_tmpchar;
cast to pointer from integer of different size
passing arg 1 of 'strcmp' makes pointer from integer without a cast
return from incompatible pointer type
Thats not good. First: Why does tmpchar[i] does not work ? And why is the returning of ws2_tmpchar incompatible ?
Thx for attention, Demonus



LinkBack URL
About LinkBacks
. First: Why does tmpchar[i] does not work ? And why is the returning of ws2_tmpchar incompatible ? 



but thx for pointing to the other errors