How to delete part of an array?
In one tutorial I downloaded, it said use "delete  arrayname", but when I attempted to compile, it said "delete function undefined" or something to that effect. So I tried this:
but when it printed, it printed "a*h" (in place of the asterick it had some other weird symbol that I have no idea how to reproduce here :) ) So I guess I'm just asking if someone can tell me how to delete a single element of a string array. (I assume it's the same for a non-string array too). Also I see that you can't put a space in that way either..., I tried ash = " "; so it should print "a h", but instead it has that weird character again....
char myname = "ash";
ash = ""; //trying to delete the s
Thanks for any help, I promise that once I start to learn more of c i'll ask more complicated stupid questions :)
solution to deleting ,part of an array
the solution to the problem i figured out ,is as follows
/*Program ----> deleting a part of an array */
/*In this program we are going to delete 'd'
key idea --->make the adderess of 'd' point to the next , and the next to the next
From -----------> Ekarshi Mitra (Btech ------1Year----CSIT)
Date -----------> 1-01-2006
Time -----------> 11:45 P.M*/
int main ()/*void main() can also be used , depends unpon programmer*/
char name="under test";
/*now suppose we remove 'd' from under test*/
name[count]=(int)*&name[count+1];/*typecasting done here*/
/* can be compiled removing (int) */
printf(" ans = %s",name);
/*compiled and run under devc++ (IDE) */