常见的C语言中连接两个字符串的方法[转]
- 最熟悉的就是strcpy/stncpy
- 其次就是memcpy
- 然后还有strcat/strncat
- 最后一种强大的就是自行暴力咯。
- 下面给一段包含所有的代码:
#include <stdio.h> #include <stdarg.h> /* * sunus lee * Mar 10, 2012 * call this function in this format: * p = strjo[......]
#include <stdio.h> #include <stdarg.h> /* * sunus lee * Mar 10, 2012 * call this function in this format: * p = strjo[......]