c++
Shary1986
热爱运动 喜欢唱歌 打台球
想为自己以后能更幸福的生活努力 努力 再努力
展开
-
c++ 学习memcpy 在各种情况下的使用
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl原创 2017-08-25 15:13:28 · 3433 阅读 · 1 评论 -
c++ 'fopen': This function or variable may be unsafe. 解决办法
main函数调用:[code="c++"] string filePath = "a.txt"; learn_fseek(filePath.c_str(), 9, SEEK_SET);[/code] 函数:[code="c++"]void learn_fseek(const char* filePath, long int offset, int origin)...原创 2017-01-23 17:40:50 · 1929 阅读 · 0 评论 -
VS 配置 *.h,*.lib,*.dll
1.*.h: headera. 路径:属性-> VC++ 目录 -> 库目录b. 文件:在代码中添加: 如: #include <iostream> 2. *.lib: library, SDK 库a. 路径: 属性-> VC++ 目录-> 库目录 b. 文件: 属性-> 链接器 -> 附加依赖项 3. *...原创 2017-05-12 13:19:34 · 108 阅读 · 0 评论 -
VS 预定义常量_WIN32,WIN32,_WIN64
Refer to:http://fenying.blog.163.com/blog/static/1020559932013725111743857 1. Win32在 Win32 配置下,WIN32 在“项目属性-C/C++-预处理器-预处理器定义”里声明了。而在 x64 配置下,这个常量并不在项目预定义列表中。这是否说明可以根据 WIN32 来判断是否在 x64 平台呢...原创 2017-05-12 11:18:04 · 1569 阅读 · 0 评论 -
c++ 回调函数
Reference to: http://blog.csdn.net/kkk0526/article/details/17122081 回调函数(1)概念:回调函数,顾名思义,就是使用者自己定义一个函数,使用者自己实现这个函数的程序内容,然后把这个函数作为参数传入别人(或系统)的函数中,由别人(或系统)的函数在运行时来调用的函数。函数是你实现的,但由别人(或系统)的函数在运行时...原创 2017-05-09 09:42:12 · 182 阅读 · 0 评论 -
ostringstream 用法
ofstream fp("test_with_prop_node.bvh"); ostringstream out_stream_buffer; // 分配空间 int len = 204800; char* tmp1 = new char[len]; tmp1[0] = 0; CCommonFunction::ExportBVHHeaderText(index, -1, 0原创 2017-11-02 17:18:40 · 4170 阅读 · 0 评论 -
c++ 代码覆盖率
使用VS 工具,gtest 测试用例查看代码覆盖率。STEP1 : 运行batch 脚本@set localFolder=D:\shary\NCLIB_ALL\bin\@set nclibFolder=\\192.168.1.110\test\NCLIB\nmc\20170918_3728@set codetrunkpath=%localFolder%/../@set VStools="E:\原创 2017-09-28 16:22:56 · 1521 阅读 · 0 评论 -
c++ eigen 简单用法
//for (int i = 0; i frame_count; i++) //{ // bool left_foot_contact = NCGetContactState(index, i, 6); // bool right_foot_contact = NCGetContactState(index, i, 3); // cout // if (ri原创 2017-09-27 17:52:49 · 3834 阅读 · 0 评论 -
hamming distance
这是在CSDN上的第一篇博客,开篇以C++的位操作的一个题目来打头阵。下面是问题描述:The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the H转载 2017-09-26 16:49:43 · 211 阅读 · 0 评论 -
c++ float 转换到string
使用 sprintf_s 来转换,代码如下: char buffer_max[20], buffer_min[20], buffer_ratio[20]; sprintf_s(buffer_max, "%f", max[i]); sprintf_s(buffer_min, "%f", min[j]); sprintf_s(buffer_r原创 2017-08-31 09:25:23 · 11497 阅读 · 0 评论 -
c++ Eigen 入门学习
FILE * fp = NULL; fp = fopen("l1_check.txt", "wb+"); for (auto frames = 0; frames frame_count; frames++) { Eigen::Quaternionf Qsensor2NED = { fileParse->quat_array_list[frames原创 2017-09-13 18:36:21 · 368 阅读 · 0 评论 -
c++ 输出到文本格式 ofstream && FILE
方法一 ofstream#define r2d 57.2958f const char * output = "output_haibo_take5.txt"; int svr_res = _access(output, 04); if (svr_res != -1) { remove(output); } ofstream outfile;原创 2017-09-06 10:25:21 · 2077 阅读 · 0 评论 -
VS 监视使用
VS 监视使用 下面有个“监视1” 可以用来监视程序的正确性。 1. 一维数组 比如有一个double h[9],如果选择监视,那么就只会监视h[0],如果想监视其他元素,难道只能h[1]、h[2]一个个的添加吗? 当然不需要,在监视中输入h,9就可以了 2. 二维数组 如: float** bvh_position_;监视: bvh_position_[0],180表示...原创 2017-03-14 15:15:13 · 1879 阅读 · 0 评论