上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 32 下一页
摘要: 修饰普通变量 修饰指针 const修饰类变量,类函数 阅读全文
posted @ 2019-06-21 14:49 JohnRed 阅读(256) 评论(0) 推荐(0) 编辑
摘要: ``` malloc是c的库函数,从堆区申请内存。 (+)new是c++运算符,从自由存储区申请内存。 malloc返回值是void*,需要判断返回值是否为空指针。如果申请内存成功,返回申请的内存地址,申请内存失败返回空指针。 使用free()函数释放内存,非空指针只能释放一次。 (+)new 返回值是申请对象的指针,申请内存失败抛出std::bad_alloc异常。使用delete释放普通对像... 阅读全文
posted @ 2019-06-21 14:22 JohnRed 阅读(1016) 评论(0) 推荐(0) 编辑
摘要: ``` * 指针是一个变量有单独的存储空间(引用是一个对象的别名,没有单独的存储空间,使用的是原对象) * 指针初四化后可以改变,可以用来指向其他的对象(引用初始化后不能改变,不能用来引用其他的对象) * 指针可以为空(引用不能为空) * 指针的长度为4个字节(引用的长度位引用对象的长度) ``` 阅读全文
posted @ 2019-06-21 11:28 JohnRed 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 样本(\\(x_{i}\\),\\(y_{i}\\))个数为\\(m\\): $$\{x_{1},x_{2},x_{3}...x_{m}\}$$ $$\{y_{1},y_{2},y_{3}...y_{m}\}$$ 其中\\(x_{i}\\)为\\(n\\)维向量: $$x_{i}=\{x_{i1}, 阅读全文
posted @ 2019-06-20 17:07 JohnRed 阅读(119) 评论(0) 推荐(0) 编辑
摘要: ``` string& insert (size_t pos, const string& str); string& insert (size_t pos, const string& str, size_t subpos, size_t sublen); string& insert (size_t pos, const char* s); string& insert (si... 阅读全文
posted @ 2019-06-20 15:28 JohnRed 阅读(2114) 评论(0) 推荐(0) 编辑
摘要: ``` string& append (const string& str); string& append (const string& str, size_t subpos, size_t sublen); string& append (const char* s); string& append (const char* s, size_t n); string& append (s... 阅读全文
posted @ 2019-06-20 15:23 JohnRed 阅读(1877) 评论(0) 推荐(0) 编辑
摘要: ``` string& assign (const string& str); string& assign (const string& str, size_t subpos, size_t sublen); string& assign (const char* s); string& assign (const char* s, size_t n); string& assign (siz... 阅读全文
posted @ 2019-06-20 15:21 JohnRed 阅读(2332) 评论(0) 推荐(0) 编辑
摘要: ``` string(); string (const string& str); string (const string& str, size_t pos, size_t len = npos); string (const char* s); string (const char* s, size_t n); string (size_t n, char c); /* std::strin... 阅读全文
posted @ 2019-06-20 15:08 JohnRed 阅读(7896) 评论(0) 推荐(0) 编辑
摘要: loop=1 while [ "$loop" -le 10 ] do echo "loop:$loop" loop=$(($loop+2)) done while true do echo "while true:test" done 阅读全文
posted @ 2019-06-20 10:44 JohnRed 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 数字循环 sum=0 for((i=1;i 阅读全文
posted @ 2019-06-20 10:42 JohnRed 阅读(1536) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 32 下一页