码迷,mamicode.com
首页 >  
搜索关键字:strcpy    ( 952个结果
[c++]容器类
#include #include using namespace std; class string1 { private: char *str; public: string1(const char *s) { str = new char[strlen(s) + 1]; strcpy(str,s); cout<<"str...
分类:编程语言   时间:2015-04-09 17:23:38    阅读次数:132
第六周 项目一-深复制体验(1)
#include #include using namespace std; class A { private: char *a; public: A(char *aa) { a = new char[strlen(aa)+1]; //(a)这样处理的意义在于:为aa指针开辟出空间 strcpy(a, aa); /...
分类:其他好文   时间:2015-04-09 15:30:44    阅读次数:109
ERROR C4996 UNSAFE
用最新的visual studio编译有些以前的代码,sprintf、strcpy、wcstombs等函数会因为内存泄漏问题而被报error4996,编译器要求使用_s版本的,只需要在预处理器定义中增加:_SCL_SECURE_NO_WARNINGS_CRT_SECURE_NO_DEPRECATE如...
分类:其他好文   时间:2015-04-09 10:20:38    阅读次数:103
C Language Study - 三大字符处理函数实现
三大字符处理函数实现|||| ==--==--==--==--==--==-- strlen , strcpy, strcmp....
分类:其他好文   时间:2015-04-08 18:01:47    阅读次数:110
缓冲区溢出及gdp调试全过程
在Linux下编写一下代码: #include #include char Lbuffer[] = "01234567890123456789========ABCD"; void foo() { char buff[16]; strcpy (buff, Lbuffer); } int main(int argc, char * argv[]) { foo();...
分类:其他好文   时间:2015-04-07 19:40:53    阅读次数:128
C/C++ 笔试、面试题目大汇总2
http://www.cnblogs.com/fangyukuan/archive/2010/09/18/1830493.html一.找错题试题1:voidtest1(){ charstring[10]; char*str1="0123456789"; strcpy(string, str1 );}...
分类:编程语言   时间:2015-04-07 13:22:42    阅读次数:188
strcpy和memcpy的标准实现
http://www.cnblogs.com/chio/archive/2009/08/01/1536628.html//============================================================================// Name : Hel...
分类:其他好文   时间:2015-04-06 16:57:32    阅读次数:133
char *与char []深度刨析
编译不能通过 #include "iostream" using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char *p= "hello" ; //不是把一个字符串赋给了一个字符型的指针,而是把一个字符型的指针指向了字符串的首地址。 strcpy(p,"hel"); cout << p << endl; return...
分类:其他好文   时间:2015-04-05 23:37:28    阅读次数:334
(C/C++) 算法,编程题
1. 求一个数的二进制中的1的个数。int func(int x){ int count = 0; while (x) { count++; x = x& (x - 1); } return count; }2.已知strcpy的函数原...
分类:编程语言   时间:2015-04-05 23:23:18    阅读次数:241
/*基本算法实现*/Linux中string.h里几个函数的实现
string.hextern int strcmp(const char*,const char*);extern char* strcpy(char*,const char*);string.cint strcmp(const char *cs, const char *ct){ unsig...
分类:编程语言   时间:2015-04-05 15:58:44    阅读次数:173
952条   上一页 1 ... 72 73 74 75 76 ... 96 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!