I believe that I learn the hard way to update my packages in FreeBSD. If I found this article earlier, I don't need spend much time googling and ask people why it so damn long to update my portsdb using 'portsdb -Uu' refer this, how to get packages in STABLE branch instead of RELEASE, is it any alternative to cvsup, ...
How to concatenate 'string' in C?
First, using python
>>> str1 = "helmi #"
>>> num = 1
>>> str2 = "%s%d" % (str1, num)
>>> print str2
helmi #1
>>> str3 = str1 + str(num)
helmi #1
Using C,
char string[] = "something";
char string2[50];
int number = 14;
sprintf(string2, "%s%d", string, number);
After spend some times googling then I found the solution in a post at comp.lang.c.
No comments:
Post a Comment