c/c++
bigdudu
这个作者很懒,什么都没留下…
展开
-
itoa c++
// itoa #include int main() { int input,i=0; char temp[10]; std::cin>>input; while(input%10){ temp[i++]=input%10+'0'; input=input/10; } temp[i]='\0'; char原创 2022-12-26 17:31:38 · 131 阅读 · 1 评论 -
数字转字符itoa
不使用itoa实现数字转字符 // itoa #include int main() { int input,i=0; char temp[10]; std::cin>>input; while(input%10){ temp[i++]=input%10+'0'; input=input/10; } temp[i]原创 2017-11-22 13:25:45 · 293 阅读 · 0 评论 -
strcopy
#include char* strcopy(const char* src,char* dst) { int i=0; char * result=dst; while(src[i]!=0) { dst[i]=src[i++]; } dst[i]=0; return result; } int main() { c原创 2017-11-23 12:09:59 · 2053 阅读 · 0 评论