View previous topic :: View next topic |
Author |
Message |
hadeelqasaimeh
Joined: 05 Jan 2006 Posts: 105
|
strcat |
Posted: Sun Apr 23, 2006 4:18 pm |
|
|
hi all
i need to make more than 4 strings in one string then printf it onto RF stream,,i dont know how to do!!!!
i tried to use strcat ,but its not succeed.
any body can help,please!
thanx |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Sun Apr 23, 2006 4:42 pm |
|
|
You don't necessarily need strcat. You could just use printf. This might wrk for you:
Code: | printf("%s%s%s%s", str1, str2, str3, str4); |
Please correct me if I'm wrong |
|
|
hadeelqasaimeh
Joined: 05 Jan 2006 Posts: 105
|
rs232(stream) |
Posted: Mon Apr 24, 2006 3:38 am |
|
|
this will print them but as different strings,,right???
what ineed is to make them as one string and print them onto software rs232(stream) and i have to finish them by\r\n
so....what do you think??? |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
Re: rs232(stream) |
Posted: Mon Apr 24, 2006 3:51 am |
|
|
hadeelqasaimeh wrote: | this will print them but as different strings,,right??? |
Your treatment of a term "string" might be different from mine, so try it and see if it works for you. If I remember correctly, printf() doesn't output the terminating null-character at the end. |
|
|
|