Royのブログ

举剑逆浪

贝叶斯滤波器

...

c++11智能指针的学习

std::shared_ptr智能指针是C++重要的特性,但是有一个问题他不支持动态数组。 12345std::shared_ptr<int []> sp1(new int[10]); // 错误 C++11没有这个特性std::shared_ptr<int []> sp1(new int[10], std::default_delete<int[]>()......

c++内存布局

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354using namespace std;class Point3d{ public: Point3d( float x=0.0, float y=0.0, float z=0.0) ......
c++

c++代码学习

差不多都算完了。 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950//如何使用explictexplicit ImageBuffer(size_t max_size = 30);//在方程中使用const &的情况和override可以使编译器检查,其......
C++

valgrind输出信息的解读

一直都在使用valgrind和gdb调试工具,但是实际上感觉收效不好,原因是我读不懂他的输出什么意思,也可能我这个人性格有一些阅读障碍,我刚查了一下,我木有阅读障碍,但是我每次读书的时候特别着急,跳着跳着走。 说到正题发现了一篇比较好的文章介绍valgrind的输出信息。链接是valgrind output explain. ...
c++

c++对于指针引用还有方程内内存的思考

1.C++方程与指针,引用 对于c++方程来说,有两个地方是关键点,一个是方程的参数传入,一个是方程返回值。直接总结: 传入参数和返回值都是默认的浅拷贝,传入值是会产生一个副本,返回值也是会产生副本的。对于指针传入值,不能在方程中分配内存,因为实际指针并没有变化,而引用值可以引用只是内存的别名只是换了个名字而已。 返回值是指针必须看下指向的地方是不是heap上,因为栈内的地址会随着方程结......
c++

rapidxml的使用方式

RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility. It is an in-situ parser written in modern C++, with parsi......

C++指针错误

一直在工作中对指针和内存分配搞不太清楚。模模糊糊。现在看下今天犯下的一个错误: 方程为 1234567891011121314151617181920212223void RouteSerializer::setupChildNode(xml_node<> *childnode, std::string childname, xml_node<> *fathernod......
C++

新的一天

经过不懈的努力终于加上了评论,终于在十多年后除了qq空间,有了另外一片净土,开心!!! ...

How to build a new blog under github

I always want to have my own blog. I really mean that a blog I could arrange it by myself. I do not like the CSDN blog which has a lot of advertisements. Now finally I built one in one day. 1 What ......