输出openni版本号
2013-10-31 11:31
281 查看
在openni中,其版本号由四个数字组成,以一个struct的形式来实现:如下
major.minor.maintenance.build
我用的版本是openni 最新版2.2.0.32,四个数字分别对应
那么在程序中得到版本号呢?代码如下:
typedef struct { /** Major version number, incremented for major API restructuring. */ int major; /** Minor version number, incremented when significant new features added. */ int minor; /** Maintenance build number, incremented for new releases that primarily provide minor bug fixes. */ int maintenance; /** Build number. Incremented for each new API build. Generally not shown on the installer and download site. */ int build; } Version;
major.minor.maintenance.build
#include <iostream> #include "OpenNI.h" int main() { openni::Status result = openni::STATUS_OK; result = openni::OpenNI::initialize(); if (result == openni::STATUS_OK) { openni::Version version = openni::OpenNI::getVersion(); std::cout << version.minor << "." << version.major << "." << version.maintenance << "." << version.build << std::endl; } openni::OpenNI::shutdown(); system("pause"); return 0; }
我用的版本是openni 最新版2.2.0.32,四个数字分别对应
那么在程序中得到版本号呢?代码如下:
#include <iostream> #include "OpenNI.h" int main() { openni::Status result = openni::STATUS_OK; result = openni::OpenNI::initialize(); if (result == openni::STATUS_OK) { openni::Version version = openni::OpenNI::getVersion(); std::cout << version.major << "." << version.minor << "." << version.maintenance << "." << version.build << std::endl; } openni::OpenNI::shutdown(); system("pause"); return 0; }
相关文章推荐
- TOMCAT下短信平台部署步骤
- linux 命令终端提示符显示-bash-4.1#解决方法
- linux 命令终端提示符显示-bash-4.1#解决方法
- ubuntu+moinmoin+nginx+uwsgi
- Opencv学习_3 (Opencv读取视频 &视频进度控制 &写视频)
- OpenRisc-53-debugging the OpenRISC 1200
- Linux驱动编写的方法学习
- fopen vs open
- linux下ifcfg-ethx的配置
- 学习JAVA应该去的20个英文网站(java学习网站)
- tomcat中jsp引用图片不能包含中文路径
- linux shell 自定义函数(定义、返回值、变量作用域)介绍
- linux 下的文本处理——除去重复行uniq命令
- Google的网站性能优化最佳实践
- 使用 Scalable Performance Monitor 监控 和分析 solr的运行状况
- Expert Shell Scripting
- 对hadoop版本YARN的一点理解
- OpenCV Learning: 图像像素Mat操作方法2
- Magnific Popup文档翻译(1)
- linux 压缩 解压缩命令使用