I think what your problem is is that strcat is expecting a pointer to a null terminated string, not just a character. TTYL > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Thomas N > Sent: Friday, March 08, 2002 16:35 > To: PICLIST@MITVMA.MIT.EDU > Subject: [OT]: strcat in c language. Please help! > > > Hello everyone, > > Here is my short program: > void main( void ) > { > int day = 1, > year = 2002; > char month[6] = "May", > bd_string[60] = {'\0'}; > > strcat(bd_string, (char) day); > strcat(bd_string, month); > strcat(bd_string, (char) year); > } > What I am trying to do is to copy "1 May 2002" into the string > "bd_string". > I try as above and it doesn't work. Please help! > Thank you! > Thomas. > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads