View Single Post
  #6  
Old 28-01-2004, 20:53
batteur91 batteur91 is offline
Membre junior
 
Join Date: 28-01-2004
Posts: 3
Re : delete the second character of a string?

thanks but, this is not enough,
In my program, sNumis eqaul to "64" for example(a numeric value).
sNum is a variable; that means it's gonna change during the execution. So I only can declare the variable sNum at the beginning of my program. I can't declare it as you did below. (sNum[0]='b' and sNum[1]='o').
main()
{
char sNum[1],res;
/*sNum = "bo"*/
sNum[0]='b';
sNum[1]='o';
/* res is the second character of sNum*/
res=sNum[1];

}
Reply With Quote