C++ char数组
2016-05-27 18:32
267 查看
int _tmain(int argc, _TCHAR* argv[])
{
char temptt[3] = "";
sprintf_s(temptt,"%d",22);
char temptt[2] = "";
sprintf_s(temptt,"%d",2);
//temptt[0] = "a";
char str[] = {"abcde"};
return 0;
}
//数组最后一位为空,必须存在的
{
char temptt[3] = "";
sprintf_s(temptt,"%d",22);
char temptt[2] = "";
sprintf_s(temptt,"%d",2);
//temptt[0] = "a";
char str[] = {"abcde"};
return 0;
}
//数组最后一位为空,必须存在的
相关文章推荐
- c++统计程序运行时间的方法
- C++实现base64编码
- 从事C和C++开发者快速学python(一)
- 今天对二级指针的深入理解
- L1-006. 连续因子(C++)
- C++ 对象的内存布局
- C/C++中获取数组的长度
- c++ 优先队列
- MFC快速入门-hello world
- C语言宏定义
- EXE和DLL互相调用
- 通过多播实现局域网上线用户列表 c++实现
- 看开源代码利器—用Graphviz + CodeViz生成C/C++函数调用图(call graph)
- 自行编写strcpy()函数和memcpy()函数
- 11个强大的Visual Studio调试小技巧
- 二叉排序树的c++实现,查找,删除等
- C++ this指针的理解
- 漫谈C++:良好的编程习惯与编程要点
- 常用的字符串和数字之间的转换函数
- c++ primer 读书笔记