码迷,mamicode.com
首页 >  
搜索关键字:const 常量    ( 36792个结果
QPixmap 和 HBITMAP互转
Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0);声明这一句后, 就可以使用了HBITMAP hBmp = qt_pixmapToWinHBITMAP(pix, 2);该函数定义在q...
分类:其他好文   时间:2014-05-09 05:06:39    阅读次数:802
Qt由pcm数据生成wav文件
void AudioGrabber::saveWave(const QString &fileName, const QByteArray &raw, const QAudioFormat &format){ typedef struct{ char riff_fileid[4];//"RIFF" ...
分类:其他好文   时间:2014-05-09 05:01:23    阅读次数:434
我和你
#include#include#include#includeusing namespace std;const int M=1000;int main(){ string china; int a[M]={-1},b[M]={-1},i,indexa,indexb,len,m; ...
分类:其他好文   时间:2014-05-08 23:27:02    阅读次数:540
[ios5 cocos2d游戏开发实战] 笔记3-FileUtils, notificationCenter
FileUtils//文件管理工具FileUtils::getInstance()std::string getStringFromFile(const std::string& filename);//读取文件中的字符串Data getDataFromFile(const std::string&...
分类:移动开发   时间:2014-05-08 23:00:07    阅读次数:419
PHP中的常量
常量是一个简单值的标识符(名字)。如同其名称所暗示的,在脚本执行期间该值不能改变(除了所谓的魔术常量,它们其实不是常量)。常量默认为大小写敏感。按照惯例常量标识符总是大写的。常量名和其它任何 PHP 标签遵循同样的命名规则。合法的常量名以字母或下划线开始,后面跟着任何字母,数字或下划线。用正则表达式...
分类:Web程序   时间:2014-05-08 18:02:00    阅读次数:356
Const和readonly这间的区别和相同处
相同: const和readonly都是用来修饰常量的不同: const 在申明之前就要对它初始化,readonly修饰的常量则可以到构造函数中初始化const注重的是效率但是readonly注重的是灵活性const在内存中不会占用内存但是readonly要保存常量的话就要消耗内存的const只能修...
分类:其他好文   时间:2014-05-08 15:36:44    阅读次数:284
boost::bind实践2——来自《Beyond the C++ Standard Library ( An Introduction to Boost )》
直接代码:代码段1: 1 #include 2 #include 3 #include 4 5 class some_class 6 { 7 public: 8 typedef void result_type; 9 void print_string(const ...
分类:编程语言   时间:2014-05-08 09:49:53    阅读次数:368
byte,short,char的类型转换
《java深入解析》中例子:在平时对byte char short这几个范围较小的类型声明并赋值时,往往忽略了一个问题。在Java源文件当中为变量赋值时经常使用字面常量,这些常量在Java中是用int类型表示的。在为long类型赋值时我们会使用:long l = 123123123L;这是因为在赋值...
分类:其他好文   时间:2014-05-08 05:35:10    阅读次数:292
查缺补漏
1.非const变量默认为extern。而要使const变量能够在其他的文件中访问,必须指定它为extern。
分类:其他好文   时间:2014-05-08 05:25:52    阅读次数:212
HDU 1011 Starship Troopers(树形dp)
OJ题目:click here~~ 树上的01背包 const int maxn = 102; int val[maxn]; int w[maxn]; vector g[maxn]; int dp[maxn][maxn]; int n , m ; void dfs(int u , int father){ int v , i , j , k; for(i = w[u];i...
分类:其他好文   时间:2014-05-08 05:09:28    阅读次数:323
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!