码迷,mamicode.com
首页 >  
搜索关键字:es6 let const    ( 43838个结果
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
Const和readonly这间的区别和相同处
相同: const和readonly都是用来修饰常量的不同: const 在申明之前就要对它初始化,readonly修饰的常量则可以到构造函数中初始化const注重的是效率但是readonly注重的是灵活性const在内存中不会占用内存但是readonly要保存常量的话就要消耗内存的const只能修...
分类:其他好文   时间:2014-05-08 15:36:44    阅读次数:284
const
#include#includeusing namespace std;int main(){ const int N=100; int const N=100; //二者等价 int mark=0; //1 int* ref_mark=&mark; int* c...
分类:其他好文   时间:2014-05-08 10:02:04    阅读次数:205
template(1)
#include#includetemplateinline T const& max(T const& a,T const &b){ //如果a<b,那么返回a return a<b?b:a;}int main(){ int i=42; std::cout<<"max(7,...
分类:其他好文   时间:2014-05-08 09:50:44    阅读次数:264
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
查缺补漏
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
const指针
const是C++中的常量限定符,在编程中经常出现。本文介绍了用const修饰指针变量的三种用法,并介绍了它们之间的区别。...
分类:其他好文   时间:2014-05-07 23:07:16    阅读次数:402
Explain的type, where 和 order by 组合是索引的选择
Explain的type显示的是访问类型,是较为重要的一个指标,结果值从好到坏依次是:system > const > eq_ref > ref > fulltext > ref_or_null > index_merge > unique_subquery > index_subquery > r...
分类:其他好文   时间:2014-05-07 21:26:56    阅读次数:282
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!