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 hereCode:char myname[4] = "ash"; ash[1] = ""; //trying to delete the s printf("%s", ash);) 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[1] = " "; so it should print "a h", but instead it has that weird character again....
Thanks for any help, I promise that once I start to learn more of c i'll ask more complicated stupid questions![]()



LinkBack URL
About LinkBacks
) 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[1] = " "; so it should print "a h", but instead it has that weird character again....



