
C++
_ywdxz_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++ strcpy()
#include #include #include #include #include using namespace std; char * my_strcpy(char *str1,const char *str2)// 源字符串加const { assert(str1); assert(str2);//是否为空指针 char *a=str1; memcpy(str1,str2,st原创 2017-05-20 17:16:42 · 655 阅读 · 0 评论 -
setw()
setw: #include 设置域宽 操作符 int main() { int a=123;//域宽:3 int b=1234;//域宽:4 cout<<"12";//域宽:2 cout<<setw(0)<<a<<endl; //域宽:2+max(0,3)=5 cout<<setw(4)<<b<<endl; //域宽:max(4,4)=4; cout<<setw(6)<<a<原创 2017-07-01 15:05:41 · 1153 阅读 · 0 评论 -
c++ extern
#include using namespace std; int main() { extern int A;//仅声明 cout<<A<<endl; } //a.cppint A=4; //b.cpp g++ a.cpp b.cpp -o main ./main 输出:4原创 2017-07-02 19:06:10 · 358 阅读 · 0 评论 -
链表 简单操作
.原创 2017-07-07 22:39:14 · 378 阅读 · 0 评论