using "=" in a conditional (was Funny Mistake)

Chuck Anderson cla at isis.cs.du.edu
Wed Mar 20 13:14:19 AEST 1991


You can do a nice string copy with this construct as well:

   (dest is a char array and source is a valid C string)

   while (*dest++ = *source++);

-- 
  *************************************************************************
     Chuck Anderson                uucp    :         uunet!isis!cla 
     Boulder, Co. (303) 494-6278   internet:         cla at isis.cs.du.edu 
  *************************************************************************



More information about the Comp.lang.c mailing list