当前位置: 首页 > news >正文

自适应网站的代表品牌整合营销推广

自适应网站的代表,品牌整合营销推广,外贸公司经营范围大全,买网站一开始运行出错#xff0c;开启debug以后发现在push自定义对象的时候调试器提示找不到一个叫/XXX/XXXX/XXXX/libcstl-2.3.0/src/cstl_list_private.c/br而那个路径正是我进行安装的路径#xff0c;安装完以后我把安装包给删除掉了#xff0c;所以它找不到。这样的话…一开始运行出错开启debug以后发现在push自定义对象的时候调试器提示找不到一个叫/XXX/XXXX/XXXX/libcstl-2.3.0/src/cstl_list_private.c/br而那个路径正是我进行安装的路径安装完以后我把安装包给删除掉了所以它找不到。这样的话我们在一开始安装的时候就要注意最好先把tar.gz解压出来的文件夹放到特定文件夹比如/usr/local/下这样不会在安装完成后被误删也比较方便查找。/br但是再次调试的时候却发现插入操作死在了调用_my_copy()函数那里里面设置了一个int型临时变量i_temp用来作中间值方便调试调试过程中发现i_temp成了一个非常小的负值。但是直接调用_my_copy()是能正确运行的。/br鉴于程序呈现出这种尿性我觉得应该是cstl它自己设计得不够健壮。。。不然实在是说不通程序会死在_my_copy()函数那里。其实最后我发现copy函数形参里的cpv_source它的地址为0x1明显就不可能。这个就关系到cstl对list的内部实现了不想再深入去了解暂时到此为止。最后还是照惯例贴个代码 1 /*2 * new_test_for_ctsl_selfType.c3 *4 * Created on: Mar 21, 20145 * Author: nerohwang6 */7 #includestdio.h8 #includestdlib.h9 #includecstl/clist.h10 #includeassert.h11 /*Initlizing a user-defined type ,use12 * func type_register(1,2,3,4,5) first.13 * 1.type: user-defined type14 * 2.ufun_init: init function15 * 3.bfun_copy: copy function16 * 4.bfun_less: less-comparison function17 * 5.ufun_destroy: destroy function18 19 bool_t type_register(20 type,21 unary_function_t ufun_init,22 binary_function_t bfun_copy,23 binary_function_t bfun_less,24 unary_function_t ufun_destroy25 );26 *27 */28 typedef struct user_defined_type29 {30 int i_first;31 int i_second;32 }myType;33 34 static void _my_init(const void* cpv_input,void* pv_output)35 {36 assert(cpv_input ! NULL);37 ((myType*)cpv_input)-i_first 8;38 ((myType*)cpv_input)-i_second 9;39 *((bool_t*)pv_output) true;40 }41 42 static void _my_copy(const void* cpv_dest,const void* cpv_source,void* pv_output)43 {44 assert(cpv_dest ! NULL cpv_source ! NULL);45 int i_temp ((myType*)cpv_source)-i_first;46 ((myType*)cpv_dest)-i_first i_temp;47 i_temp ((myType*)cpv_source)-i_second;48 ((myType*)cpv_dest)-i_second i_temp;49 *((bool_t*)pv_output) true;50 }51 52 static void _my_destroy(const void* cpv_input,void* pv_output)53 {54 assert(cpv_input ! NULL);55 ((myType*)cpv_input)-i_first 0;56 ((myType*)cpv_input)-i_second 0;57 *((bool_t*)pv_output) true;58 }59 60 static void _my_less(const void* cpv_first, const void* cpv_second,void* pv_output)61 {62 assert(cpv_first ! NULL cpv_second ! NULL);63 *((bool_t*)pv_output) (((myType*)cpv_first)-i_first ((myType*)cpv_second)-i_first)?true:false;64 }65 66 int main(int argc,char* argv[])67 {68 list_t* pList create_list(myType);69 list_iterator_t i_it;70 list_iterator_t my_it;71 printf(Before type register:\n);72 if(pList NULL){73 printf(Creation of myType failed!\n);74 }else{75 printf(Creation of myType succeeded!\n);76 }77 type_register(myType,_my_init,_my_copy,_my_less,_my_destroy);78 79 pList create_list(myType);80 printf(After type register:\n);81 if(pList ! NULL){82 printf(Creation of myType succeeded!\n);83 }else{84 printf(Creation of myType failed!\n);85 }86 87 //just a simple test.88 myType my_first;89 my_first.i_first 1;90 my_first.i_second 2;91 printf(first :one- %d,sec- %d\n,my_first.i_first,my_first.i_second);92 93 myType my_second; //default94 95 myType my_third;96 my_third.i_first 12;97 my_third.i_second 13;98 99 list_t* pList_i create_list(int); 100 if(pList_i NULL){ 101 printf(Creation of int list failed!\n); 102 } 103 list_init(pList_i); 104 list_push_back(pList_i,3); 105 list_push_back(pList_i,8); 106 list_push_back(pList_i,7); 107 printf(Now we have %d int-var in our list\n,list_size(pList_i)); 108 for(i_it list_begin(pList_i);!iterator_equal(i_it,list_end(pList_i));i_it iterator_next(i_it)) 109 { 110 printf(%d\t,*(int*)iterator_get_pointer(i_it)); 111 } 112 printf(\n); 113 114 bool_t b_temp; 115 _my_copy((void*)my_second,(void*)my_first,(void*)b_temp); 116 printf(Second :one- %d,sec- %d\n,my_second.i_first,my_second.i_second); 117 118 printf(break point\n); 119 list_init(pList); 120 list_push_back(pList,my_second); 121 my_it list_begin(pList); 122 printf(Second myType: one- %d , sec-%d\n,((myType*)iterator_get_pointer(my_it))-i_first,\ 123 ((myType*)iterator_get_pointer(my_it))-i_second); 124 125 126 printf(break point\n); 127 list_push_back(pList,my_first); 128 list_push_back(pList,my_third); 129 printf(Now we have %d obj in our list\n,list_size(pList)); 130 return 0; 131 132 }  转载于:https://www.cnblogs.com/nerohwang/p/3616265.html
http://wiki.neutronadmin.com/news/261847/

相关文章:

  • 创业做网站 优帮云开网站做代销好
  • 网站服务器部署商城app定制开发
  • 网站的网站建设企业铜山网站开发
  • 做网站能接到模具单吗wordpress主题插件
  • 用c语言怎么做网站网站建设公司苏州
  • 做网站注意网站模版上线需要什么
  • 提供网站建设备案公司wordpress 3.8 下载
  • 自建站价格青岛北京网站建设公司哪家好
  • 做英文题的网站wordpress用户权限管理
  • 搬瓦工vps建设网站装修计算器在线计算
  • 网站开发前后端工具组合网站建设流程图在线制作
  • 空间数据云网站中英文网站asp怎么做
  • 网站建好了 如何推广网络运营商是什么意思
  • 英文网站建设大概多少钱wordpress 微信 同步
  • 在百度搜不到网站专业食品包装设计公司
  • 酷炫给公司网站欣赏市场调研报告模板ppt
  • 什么是网站的入口网站建设开发定制
  • 网站建设合同的风险责任oppo游戏中心官网
  • 旅游网站建设的目的及功能定位软件管理软件哪个好
  • 爱网站无法登录怎么回事怎样创建自己的网站
  • html5 公众号 网站开发大连市城市建设管理局网站
  • 对外宣传网站建设方案网站备案后怎么做
  • 建设一个网站成本多少钱网络推广运营途径
  • 手机网站 用户体验有专门做几口农机的网站
  • 性做网站广州安卓程序开发
  • 最潮流的网站开发脚本语言网站游戏案例
  • mvc 手机网站开发网站一键提交
  • 网站建成后应该如何推广市场调研公司成功案例
  • 找高权重的网站做外链安徽省建设工程信息网百度
  • 长沙网站seo费用开放一个网站多少钱