如何在C语言的结构体中像类一样封装函数

上传者: henryying | 上传时间: 2022-04-23 15:39:31 | 文件大小: 3.33MB | 文件类型: RAR
结构体可以看做是C语言中的类 但是结构体中不能封装函数,只能有数据成员 这个程序演示了如何像c++的类一样在结构体中增加函数 如果有错误,欢迎交流

文件下载

资源详情

[{"title":"( 64 个子文件 3.33MB ) 如何在C语言的结构体中像类一样封装函数","children":[{"title":"UCosProject","children":[{"title":"UCosProject","children":[{"title":"stdafx.h <span style='color:#111;'> 233B </span>","children":null,"spread":false},{"title":"UCosProject.vcproj.XIAOTING.Administrator.user <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"targetver.h <span style='color:#111;'> 498B </span>","children":null,"spread":false},{"title":"uCOS-II","children":[{"title":"Doc","children":[{"title":"QuickRefChart-Color.PDF <span style='color:#111;'> 19.98KB </span>","children":null,"spread":false},{"title":"ReleaseNotes.PDF <span style='color:#111;'> 312.90KB </span>","children":null,"spread":false},{"title":"WhatsNewSince-V200.PDF <span style='color:#111;'> 101.92KB </span>","children":null,"spread":false},{"title":"TaskAssignmentWorksheet.XLS <span style='color:#111;'> 31.50KB </span>","children":null,"spread":false},{"title":"uCOS-II-CfgMan.PDF <span style='color:#111;'> 118.48KB </span>","children":null,"spread":false},{"title":"QuickRefChart-Color.xls <span style='color:#111;'> 33.00KB </span>","children":null,"spread":false},{"title":"uCOS-II-RAM-Calc.xls <span style='color:#111;'> 30.00KB </span>","children":null,"spread":false},{"title":"TaskAssignmentWorksheet.PDF <span style='color:#111;'> 14.00KB </span>","children":null,"spread":false},{"title":"uCOS-II-RefMan.PDF <span style='color:#111;'> 289.27KB </span>","children":null,"spread":false},{"title":"README.TXT <span style='color:#111;'> 4.53KB </span>","children":null,"spread":false}],"spread":true},{"title":"Source","children":[{"title":"os_tmr.c <span style='color:#111;'> 44.81KB </span>","children":null,"spread":false},{"title":"ucos_ii.c <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false},{"title":"os_mutex.c <span style='color:#111;'> 35.32KB </span>","children":null,"spread":false},{"title":"os_flag.c <span style='color:#111;'> 53.56KB </span>","children":null,"spread":false},{"title":"os_mbox.c <span style='color:#111;'> 24.66KB </span>","children":null,"spread":false},{"title":"os_core.c <span style='color:#111;'> 67.36KB </span>","children":null,"spread":false},{"title":"os_q.c <span style='color:#111;'> 36.45KB </span>","children":null,"spread":false},{"title":"ucos_ii.h <span style='color:#111;'> 70.31KB </span>","children":null,"spread":false},{"title":"os_cfg_r.h <span style='color:#111;'> 9.57KB </span>","children":null,"spread":false},{"title":"os_task.c <span style='color:#111;'> 48.43KB </span>","children":null,"spread":false},{"title":"os_dbg_r.c <span style='color:#111;'> 11.42KB </span>","children":null,"spread":false},{"title":"os_mem.c <span style='color:#111;'> 19.05KB </span>","children":null,"spread":false},{"title":"os_time.c <span style='color:#111;'> 10.34KB </span>","children":null,"spread":false},{"title":"os_sem.c <span style='color:#111;'> 23.21KB </span>","children":null,"spread":false},{"title":"vssver2.scc <span style='color:#111;'> 158B </span>","children":null,"spread":false}],"spread":false},{"title":"Ports","children":[{"title":"WIN32","children":[{"title":"os_trace.h <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"os_cpu.h <span style='color:#111;'> 5.13KB </span>","children":null,"spread":false},{"title":"os_cpu_c.c <span style='color:#111;'> 27.96KB </span>","children":null,"spread":false},{"title":"os_trace.c <span style='color:#111;'> 3.01KB </span>","children":null,"spread":false},{"title":"vssver2.scc <span style='color:#111;'> 216B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"my_math.h <span style='color:#111;'> 364B </span>","children":null,"spread":false},{"title":"UCosProject.vcproj.ATI-HENRY.henry.user <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"ucos_ii.obj <span style='color:#111;'> 143.91KB </span>","children":null,"spread":false},{"title":"UCosProject.obj <span style='color:#111;'> 19.57KB </span>","children":null,"spread":false},{"title":"stdafx.obj <span style='color:#111;'> 3.58KB </span>","children":null,"spread":false},{"title":"vc90.idb <span style='color:#111;'> 979.00KB </span>","children":null,"spread":false},{"title":"BuildLog.htm <span style='color:#111;'> 7.17KB </span>","children":null,"spread":false},{"title":"UCosProject.exe.embed.manifest.res <span style='color:#111;'> 728B </span>","children":null,"spread":false},{"title":"os_trace.obj <span style='color:#111;'> 19.92KB </span>","children":null,"spread":false},{"title":"UCosProject.exe.intermediate.manifest <span style='color:#111;'> 621B </span>","children":null,"spread":false},{"title":"os_cpu_c.obj <span style='color:#111;'> 39.54KB </span>","children":null,"spread":false},{"title":"mt.dep <span style='color:#111;'> 67B </span>","children":null,"spread":false},{"title":"vc90.pdb <span style='color:#111;'> 132.00KB </span>","children":null,"spread":false},{"title":"UCosProject.exe.embed.manifest <span style='color:#111;'> 663B </span>","children":null,"spread":false},{"title":"my_math.obj <span style='color:#111;'> 7.22KB </span>","children":null,"spread":false}],"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 216B </span>","children":null,"spread":false},{"title":"SystemConfig.h <span style='color:#111;'> 4.27KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"UCosProject.cpp <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"Win32Config.h <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"includes.h <span style='color:#111;'> 761B </span>","children":null,"spread":false},{"title":"my_math.c <span style='color:#111;'> 741B </span>","children":null,"spread":false},{"title":"UCosProject.vcproj <span style='color:#111;'> 5.30KB </span>","children":null,"spread":false},{"title":"UCosProject.vcproj.ZNKZS-HENRY.User.user <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false}],"spread":false},{"title":"UCosProject.ncb <span style='color:#111;'> 14.03MB </span>","children":null,"spread":false},{"title":"UCosProject.sln <span style='color:#111;'> 899B </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"UCosProject.ilk <span style='color:#111;'> 405.39KB </span>","children":null,"spread":false},{"title":"UCosProject.pdb <span style='color:#111;'> 635.00KB </span>","children":null,"spread":false},{"title":"UCosProject.exe <span style='color:#111;'> 69.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"UCosProject.suo <span style='color:#111;'> 29.50KB </span>","children":null,"spread":false},{"title":"如何在结构体中实现类 相关知识说明.txt <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • jixiekuangzhe :
    一般般吧,太多无用的东西
    2021-03-18
  • hkiser :
    然并阮的玩意
    2019-07-02
  • qq_36280339 :
    就那样吧,简单的东西。
    2018-11-22
  • intermec :
    说得太简单了,,
    2015-02-08
  • wcm778899 :
    同意一楼,没什么作用!
    2014-08-11

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明